Double negation

Double negation casts a string or a number to a boolean:

var bool = !!num;

Comments

Popular posts from this blog

ReactJS

Unit Testing in Javascript

Anonymous Functions