How to filter objects in array in JavaScript

Arrays
Last updated Dec 18, 2017
const friends = [
  { name: "Abby", age: 22 },
  { name: "Boby", age: 16 },
  { name: "Coel", age: 20 },
  { name: "Dany", age: 15 }
];

//who can drink?
friends.filter(friend => friend.age >= 18);
[
    { name: 'Abby', age: 22 },
    { name: 'Coel', age: 20 },
]