Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

var a = x || y Variable Assignment In JavaScript


	var a = false || 4 || 2;
    /*a= 4*/
    /*if the first value is anything but false, assign it  to a. Otherwise, do the same for the second value until you find a non false value. If none, then a is false*/
    
 
PREVIOUS NEXT
Tagged: #var #Variable #Assignment #In #JavaScript
ADD COMMENT
Topic
Name
1+9 =