-
-
Save hellokvn/7a626cd91d1ffc5261b40b6ce368f0f0 to your computer and use it in GitHub Desktop.
toggleBoolean.ts
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
const toggleBoolean = (val: boolean): boolean => (val = !val); | |
toggleBoolean(true); // -> false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment