1. Home
  2. Javascript
  3. Filter function
#javascript#filter#es6

Filter out values from a set of data.

let values = [23, 4, 345, 6, 343, 22];
values.filter(number => number < 23);
// This returns [4, 6, 22]
copy
Full Javascript cheatsheet
Sitemap Git repository