Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära OR Logical Operator | Conditional Statements
Introduction to JavaScript
course content

Kursinnehåll

Introduction to JavaScript

Introduction to JavaScript

1. Getting Started
3. Conditional Statements
4. Mastering Functions
5. Exploring Arrays
6. Discovering Loops

book
OR Logical Operator

The || (OR) operator is used for defining the "or" relation between two or more expressions.

It returns true if any of the expressions evaluate to true.

Example:

12345
let a = 9; if(a < 10 || a > 30) { console.log("Condition Matched"); }
copy

The above code output "Condition Matched" when a is less than 10 OR a is greater than 30.

question mark

What is the result of the following expression if x = 5?

Select the correct answer

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 3. Kapitel 14

Fråga AI

expand
ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

course content

Kursinnehåll

Introduction to JavaScript

Introduction to JavaScript

1. Getting Started
3. Conditional Statements
4. Mastering Functions
5. Exploring Arrays
6. Discovering Loops

book
OR Logical Operator

The || (OR) operator is used for defining the "or" relation between two or more expressions.

It returns true if any of the expressions evaluate to true.

Example:

12345
let a = 9; if(a < 10 || a > 30) { console.log("Condition Matched"); }
copy

The above code output "Condition Matched" when a is less than 10 OR a is greater than 30.

question mark

What is the result of the following expression if x = 5?

Select the correct answer

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 3. Kapitel 14
Vi beklagar att något gick fel. Vad hände?
some-alt