Last active
May 23, 2019 21:36
-
-
Save unlocomqx/441d556dd95396de66907f89a37f0881 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 condition = false; | |
const myArray = [ | |
"value 1", | |
"value 2", | |
condition && "value 3", | |
!condition && "value 4" | |
].filter(Boolean); | |
console.log(myArray); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment