Skip to content

Instantly share code, notes, and snippets.

@katepapineni
Last active July 24, 2020 14:01
Show Gist options
  • Save katepapineni/40530f71881854955a4aa435866560ef to your computer and use it in GitHub Desktop.
Save katepapineni/40530f71881854955a4aa435866560ef to your computer and use it in GitHub Desktop.
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