how do i do operation check in javascript code example
Example 1: 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
}
Example 2: modulus js
console.log(10%3);
//returns 1 (the remainder of 10/3)