1. Home
  2. Javascript
  3. Filter function

Filter out values from a set of data.

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