04 Mar
2016
The !! construct is a simple way of turning any JavaScript expression into
its Boolean equivalent. For example: !!"he shot me down" === true and !!0 ===
false . In listing 4.8 we end up converting a function into its Boolean equiva-
lent, which will always be true . (Sure we could have hardcoded true , but then
we wouldn’t have had a chance to introduce !! ).