Created
October 17, 2020 18:00
-
-
Save mbrown3321/f275f32a7f9fe27b054956ce09499be6 to your computer and use it in GitHub Desktop.
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
let results = [] | |
for (let i = 0; i < users.length; i++) { | |
if (users[i].active && users[i].loginCount > 50) { | |
results.push(users[i]); | |
} | |
} | |
// [ | |
// { | |
// "id": 2, | |
// "name": "Dwight Schrute", | |
// "loginCount": 776655, | |
// "active": true | |
// }, | |
// { | |
// "id": 3, | |
// "name": "Jim Halpert", | |
// "loginCount": 75, | |
// "active": true | |
// } | |
// ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment