I know that !!variable
will convert variable into a boolean value and the function Boolean()
, according to the ecma262 spec, will also perform a type conversion by calling ToBoolean(value)
.
My question is: what's the difference? Is !!
better in performance than Boolean() ?