loading...

re: Bang bang, you're boolean! VIEW POST

FULL DISCUSSION
 

Ok thanks nice tip. But why not !==== already :P. And then if you really meant !== then your example is incorrect because if user is null your code would return false which is not the case with !!. Sorry just being pedantic.

(this was written when the post had the following example)

function isLoggedIn() {
  return user !=== undefined;
}
 

Ooops! I've put too many === indeed :-)

code of conduct - report abuse