DEV Community

Discussion on: Daily Challenge #44 - Mexican Wave

Collapse
 
jeddevs profile image
Theo

Always amazes me when people get it into one line. 👍

Thread Thread
 
chrisachard profile image
Chris Achard

map, filter, and reduce are your friend! Whenever I'm dealing with translating one string, array, or object into another one, there's probably a way to do it by just chaining those three methods together.

Thread Thread
 
jeddevs profile image
Theo

Nice, I'm a python man myself and will be sure to check it out! 👍
(I believe map,filter and reduce are available in python as well....)

Thread Thread
 
moopet profile image
Ben Sinclair

Minimising your javascript will get everything onto one line. I'm not sure about why you'd want to do that when showing your code to anyone though.