+ 2
Umm.., what is this filter here???
Yes I have reached all the way to almost the end of the course but I really don't know what this filter is. I hope its not been told, otherwise I would be a bad learner.
4 Answers
+ 1
Hello, what filter in what course do you mean?
0
What filters??
0
nums.filter(n => n % 2 == 0).map(el => sum+=el)
This filter is what I am talking about
also the map!!!
0
the filter is a method that iterates over items of an iterable and filters out what you want.
In this case we are filtering out to get only even numbers.