I was going to mention that. When using something like Codewars, it's really easy to see clever solutions by others and then possibly get into the habit of always trying to be clever too.
It is fun to try to be clever on stuff like that, but it's almost never necessary—at least not to that degree.
I've been doing that a lot in CodeWars. Putting the entire code in a single return statement. I'm talking about converting a string to an array, running map and reduce on it, then converting it back to a string in a single return statement.
Yea exactly what I'm talking about :) It's fun right!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.