Created
June 24, 2017 05:16
-
-
Save lubien/c8f7d1b466f35946e4083bd9c71b64ef to your computer and use it in GitHub Desktop.
Meeting Lambda #12: Quantification - Are All Integers?
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 xs = [1, 2, 3, 4, 5] | |
const ys = [1, 2, 'a', 4, 5] | |
const areXsIntegers = xs.every(Number.isInteger) | |
const areYsIntegers = ys.every(Number.isInteger) | |
console.log(areXsIntegers) // true | |
console.log(areYsIntegers) // false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment