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

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -