My code is as follows
const b = a.method(a => a.length > 7);
Essentially I need to change
method to an iteration (not sure if that's even the correct term) that will create a new variable which only returns words greater than 7 characters.
length is obviously checking the length, which is great.. but I'm a bit stumped.
Any idea on where I can find a list of methods with easy explanations?
Juan Pablo Isaza
Your arrow function looks correct, you just need to pass it to
var foo = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; console.log(foo.filter(item => (item > 7)));