operator sign in variable js 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: javascript expression
// EXPRESSION: Code that produces a value
// example(s):
3 + 4
1991
true && false && false
// STATEMENT: Code that performs actions (generally something that ends in ";"
// example:
const str = `String assigned to str`;