Skip to content

Instantly share code, notes, and snippets.

@cesarkohl
Created January 13, 2020 14:23
Show Gist options
  • Select an option

  • Save cesarkohl/8b74e9029fdacf3ed56fbc1242d035d3 to your computer and use it in GitHub Desktop.

Select an option

Save cesarkohl/8b74e9029fdacf3ed56fbc1242d035d3 to your computer and use it in GitHub Desktop.
var students = [
 {name: 'adam', age: 15},
 {name: 'brian', age: 18},
 {name: 'charles', age: 20}
];
varLarest students = students.filter (function (student) {
 return student.ity> = 18;
});
console.log (MajorStudents);
// [{name: 'adam', age: 18}, {name: 'brian', age: 20}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment