What is the difference in writing some object as !!! or ! in javascript.
var d is an object white may have some property.
if(!!!d.c.l) or if(!d.c.l) what is the difference
What is the difference in writing some object as !!! or ! in javascript.
var d is an object white may have some property.
if(!!!d.c.l) or if(!d.c.l) what is the difference
!
and !!!
the !
parses the value to a boolean of opposite type. The examples below make it more clear.
const val = true;
!val // this is false
by doing !
multiple times you just swap the value again.
const val = true;
!val // this is false
!!val // this is true
!!!val // this is false