DEV Community

Discussion on: Daily Challenge #263 - Reverse Words

Collapse
 
aminnairi profile image
Amin • Edited

This looks very clean, well done. I think I would have gone for that one if keeping spaces wasn't an issue, but it is in this challenge.

The second code example from this post is wrong in the sense that spaces must be kept, and only a few provided solutions here are working because the example was not clear enough on what was expected.

- "double spaces" ==> "elbuod secaps"
+ "double  spaces" ==> "elbuod  secaps"

I always lookup for the original challenge in Codewars to get a better specification to what I'm supposed to provide as a valid solution.

Original challenge specification.