Skip to content

Instantly share code, notes, and snippets.

@mcsee

mcsee/bang.js

Last active May 3, 2021
Embed
What would you like to do?
!true // returns false
!false // returns true
isActive = true
!isActive // returns false
age = 54
!age // returns false
array = []
!array // returns false
obj = new Object;
!obj // returns false
!!true // returns true
!!false // returns false
!!isActive // returns true
!!age // returns true
!!array // returns true
!!obj // returns true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment