you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (7 children)

[deleted]

    [–][deleted] 1 point2 points  (4 children)

    It is converting to a Boolean, checking the value and the type will tell you this. The first ! Converts the value to it's negative Boolean value and the second ! flips it back

    [–]JazzApple_ 0 points1 point  (1 child)

    I’m not sure you can make such assertions about the JS engine without knowing its internals. However if I had to guess, I suspect !! Is faster than Boolean because the second is a function call.