DEV Community

Discussion on: Daily Challenge #51 - Valid Curly Braces

Collapse
 
ynndvn profile image
La blatte

I just try to find a really short working solution, hence the uglified code! That's why I try to explain it as much as I can after that

Thread Thread
 
aminnairi profile image
Amin

I think that these kind of challenges prior more the algorithm part than the gulfing part. Since ES6, JavaScript has became a good language for gulfing but sometimes self explanatory code is better than gulfed one.

Its a matter of taste I guess.

Thread Thread
 
ynndvn profile image
La blatte

Exactly! As a matter of fact, I prefer Alfredo Salzillo's solution as it is a clear and pretty oneliner. On these challenges I try to come up with solutions different than a straight-forward approach (and tend to golf it too), which I couldn't manage to do on this one. That explains the ugly part of the solution I provided, which is kinda disappointing!