Answers for "or operator js"

5

or in js

// The Or operator in Javascript is 2 vertical lines = ||

//Example
var firstnumber = 10;
var secondnumber = 20;

//The Or operator in action
if(firstnumber > 20 || secondnumber< 10) {
}
Posted by: Guest on May-09-2021
1

or statment javscript

if (x === 5 || x === 8)
  console.log("x is eaqual to 5 OR 8")
Posted by: Guest on July-21-2020
6

or operator in javascript

//The OR operator in Javascript is 2 verticals lines: ||

var a = true;
var b = false;

if(a || b) {
	//one of them is true, code inside this block will be executed
}
Posted by: Guest on July-25-2020
3

less than or equal to javascript

if(a <= 5){
   yourFunction();
}
Posted by: Guest on February-22-2020
4

not operator js

let a = true;

let b = !a;

console.log(b); //output: false
Posted by: Guest on July-11-2020
0

or operator js

//OR Operator 

const x = 7;
const y = 4;

(x == 5 || y == 5); // false 
(x == 7 || y == 0); // true
(x == 0 || y == 4); // true
(x == 7 || y == 4); // true
Posted by: Guest on September-26-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language