Skip to content

Instantly share code, notes, and snippets.

@hellokvn
Last active Feb 25, 2022
Embed
What would you like to do?
toggleBoolean.ts
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