Last active
February 6, 2019 17:10
-
-
Save Chuloo/8152e3ad8f6f952b14caad1e931b167f to your computer and use it in GitHub Desktop.
Test for users that can drive
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
// Age of users | |
const ages = [17, 18, 22, 25]; | |
// Age threshold to drive | |
const drivingAge = 16; | |
// Test users for who can drive | |
let canDrive = ages.every(function(age){return age >= drivingAge;}); | |
console.log(canDrive) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment