re: Equivalents in Python and JavaScript. Bonus VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Great post. You can also use a list comprehension instead of the map or the filter in python. It's a little bit cleaner imo!
 

I use list comprehensions quite often and much more often than map or filter. But in this article I was trying to find the closest equivalents of Python and JavaScript. As far as I know, there are no list comprehensions in JavaScript..

Oh wait. There are! developer.mozilla.org/en-US/docs/W...

But unfortunately, they are not supported by any modern browser.

 

OK, I understand 😉

I didn't know either about these javascript functions ! Hope we can really use them one day !

code of conduct - report abuse