Created
July 20, 2021 20:47
-
-
Save diasraphael/5c1795c5d76087923292e76800635c0a 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
function openOrSenior(data) { | |
const newData = data.map((item) => { | |
if (item[0] >= 55 && item[1] > 7) { | |
return 'Senior' | |
} else { | |
return 'Open' | |
} | |
}); | |
return newData; | |
} | |
openOrSenior([ | |
[18, 20], | |
[45, 2], | |
[61, 12], | |
[37, 6], | |
[21, 21], | |
[78, 9], | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment