0

I have the following expression:

!([BLANK] === 4) && "STRing" === "STRing"

My question is, what does the ! symbol mean in this expression?

Spectric
  • 30,714
  • 6
  • 20
  • 43

1 Answers1

3

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
Spectric
  • 30,714
  • 6
  • 20
  • 43