JavaScript Array Methods Filter methods and useage | filter()

Published: 01 March 2020
on channel: TechFun
32,481
3

Please check this article for more information
https://www.techwithfun.com/5-tricky-...

/* Array methods : Array.prototype.filter() */
const people = [{'name': 'A','age': 17},{'name': 'B','age': 56},{'name': 'C','age': 33},{'name': 'D','age': 47}]

const children = people.filter(person =_ person.age _=18);
console.log(children);

const valuesArray = ['name', 32, {a:3,name:"c"}, 0, undefined, "array", null];
const truthyOnly = valuesArray.filter(Boolean);

console.log("TruthyOnly ", truthyOnly);


Watch video JavaScript Array Methods Filter methods and useage | filter() online without registration, duration hours minute second in high quality. This video was added by user TechFun 01 March 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 32,48 once and liked it people.