Umm.., what is this filter here??? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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.

21st Feb 2021, 10:04 AM
NoBody
NoBody - avatar
4 Answers
+ 1
Hello, what filter in what course do you mean?
21st Feb 2021, 10:17 AM
Julian
Julian - avatar
0
What filters??
21st Feb 2021, 10:19 AM
Samira
Samira - avatar
0
nums.filter(n => n % 2 == 0).map(el => sum+=el) This filter is what I am talking about also the map!!!
21st Feb 2021, 5:49 PM
NoBody
NoBody - avatar
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.
8th Mar 2021, 6:02 PM
Harout Parseghian
Harout Parseghian - avatar