I have the following expression:
!([BLANK] === 4) && "STRing" === "STRing"
My question is, what does the ! symbol mean in this expression?
I have the following expression:
!([BLANK] === 4) && "STRing" === "STRing"
My question is, what does the ! symbol mean in this expression?
The ! symbol is used to indicate whether the expression defined is false or not.
For example, !(5==4) would return true, since 5 is not equal to 4.
The equivalent in English would be not.
Some further tests:
var Spectric = "cool";
console.log("Is 5 not equal to 4? "+!(5==4)); //true
console.log("Is 'foo' not equal to 'bar'? "+!("foo"=="bar")); //true
console.log("Is Spectric not equal to Spectric? "+!(Spectric==Spectric)); //false