Created
October 18, 2021 05:05
-
-
Save kmylo/778efa46d1bae1b731670997bcfee661 to your computer and use it in GitHub Desktop.
conditions array
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
let condition1 = 13 ==='13'; | |
let condition2 = 1 === 1 | |
let condition3 = {} ==={}; | |
let condArray = [ | |
condition1, condition2 | |
] | |
if(!condArray.includes(false)){ | |
console.log('all false') | |
} | |
// ES7 | |
if(condArray.includes(true)){ | |
console.log('all true') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment