david-s
12/2/2018 - 7:24 PM

Higher Order - Filter

//filter - greater than 200
const aboveTwoHundred = vals.filter(val => val >= 200);
console.log(aboveTwoHundred);
//filter - odd
const odd = vals.filter(val => val % 2);
console.log(odd);