Asked 7 years ago
6 Jan 2017
Views 930
Rasi

Rasi posted

!! (not not) operator in JavaScript?

what is !! (not not) operator in JavaScript? how it useful in JavaScript coding and how to use it ?
i did not heard !! operator but heard about ! - not operator . - noob  
Jan 7 '17 03:21
Mitul Dabhi

Mitul Dabhi
answered Nov 30 '-1 00:00

! operator invert Boolean property , it make true to false and false to true so

!false=true
!true=false

and !! ( not not ) its nothing like two time ! operator . so if !!false return false and !!true return true.
so !! means invert two time.

!!false=false
!!true=true


hope it clear
Phpworker

Phpworker
answered Nov 30 '-1 00:00

!! not not is two time ! not operator nothing else . no more mis conception please
Post Answer