Skip to content

Instantly share code, notes, and snippets.

@anjmao
Created November 26, 2017 12:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anjmao/24da3e002833064cc2237e353a16a299 to your computer and use it in GitHub Desktop.
Save anjmao/24da3e002833064cc2237e353a16a299 to your computer and use it in GitHub Desktop.
const languages = [
{ id: 1, name: 'Javascript', rating: 9 },
{ id: 1, name: 'Golang', rating: 9 },
{ id: 1, name: 'Python', rating: 8 },
{ id: 1, name: 'Rust', rating: 8 },
{ id: 1, name: 'C#', rating: 7 },
{ id: 1, name: 'Java', rating: 5 }
];
const bestLanguages = languages.filter(x => x.rating > 8).map(x => x.name);
console.log(bestLanguages);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment