and or javscript code example
Example 1: or statment javscript
if (x === 5 || x === 8)
console.log("x is eaqual to 5 OR 8")
Example 2: || in js
const a = 3;
const b = -2;
console.log(a > 0 || b > 0);
// expected output: true
if (x === 5 || x === 8)
console.log("x is eaqual to 5 OR 8")
const a = 3;
const b = -2;
console.log(a > 0 || b > 0);
// expected output: true