#Struggling understanding negation operator

2 messages · Page 1 of 1 (latest)

rough edge
#

The example you have is bad
In short, if the value is falsy it returns true. Otherwise it returns false

molten inlet
#

your console logs won't help you, they need to be more descriptive. if checks will pass if their condition evaluate to true. for that to happen, the condition after the bang needs to be false/falsy so the bang will invert it to true, so the if check runs. make sure to attempt logging different values and have them display on your console.log so you can see what passes and what doesn't