javascript - Is there an interest to use double boolean negation? -
as beginner in javascript, have question may seem bit weird. using external lib found on web in found code below :
if('useholes' in c){ this.config.useholes = !!c.useholes; }
is there interest use double exclamation mark or clumsy code ?
couldn't find answer yet guess can remove them wanted 100% sure.
with double !
force object return "boolean-able", if null
or else, can evaluated bool true
or false
.
Comments
Post a Comment