x === false ? true: false;
what doesn't above JavaScript mean? is it if x is equal to false then set x to true or else set x to false?
x === false ? true: false;
what doesn't above JavaScript mean? is it if x is equal to false then set x to true or else set x to false?
 
    
    That resolves to true if x is strictly equal to false, and false otherwise. No value is set for x.
 
    
    x === false ? true: false;
When x is equal and of the same type(boolean) then the statement is true else statement is false.
Written longhand would be
if(x === false){
    return true;
}else{
    return false;
}
 
    
    It's called the ternary operator. Learn more about it here
or in long hand
 if (x === false)
 {
   return true;
 }
 else 
 {
    return false;
 }
