Last active
July 24, 2020 14:01
-
-
Save katepapineni/40530f71881854955a4aa435866560ef 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
const curve = 5; | |
const students = [ | |
{ name: 'Thor', score: 98 }, | |
{ name: 'Wonder Woman', score: 92 }, | |
{ name: 'Spiderman', score: 98 }, | |
{ name: 'Captain America', score: 88 }, | |
]; | |
const scores = [...new Set(students.map(x => x.score + curve))]; | |
// What's the output? | |
console.log(scores); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment