Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js or operator

/*OR operator:*/
||

// example:
var a = 10;
var b = 5;

if(a > 7 or b > 7){ 
  print("This will print!")
}
// Even though a is not less than 7, b is, so the program will print
// the statement.
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #js #operator
ADD COMMENT
Topic
Name
3+8 =