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);


On this page of the site you can watch the video online JavaScript Array Methods Filter methods and useage | filter() with a duration of hours minute second in good quality, which was uploaded by the user TechFun 01 March 2020, share the link with friends and acquaintances, this video has already been watched 32,481 times on youtube and it was liked by 3 viewers. Enjoy your viewing!