Last active
October 17, 2016 12:37
-
-
Save thomhos/ebe249c9d4415d7a63bea93dbd62cc42 to your computer and use it in GitHub Desktop.
Switch a boolean
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let foo = false; | |
toggle = val => val = !val; | |
$thing.on('click', () => foo = toggle(foo)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment