Skip to content

Instantly share code, notes, and snippets.

@mirajehossain
Created June 21, 2018 04:54
Show Gist options
  • Save mirajehossain/948ecd8dd0e98e57662d36b3d5dc1348 to your computer and use it in GitHub Desktop.
Save mirajehossain/948ecd8dd0e98e57662d36b3d5dc1348 to your computer and use it in GitHub Desktop.
let newDepartments = departments.filter(department=>{
return department.student<=5000;
});
//output:
[
{ name: 'EEE', student: 2000},
{ name: 'CSIT', student: 5000},
{ name: 'ME', student: 4500},
{ name: 'LAW', student: 2500}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment