Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
can anyone explain what's happening in the first two lines of the function body?
I understand it's setting up a loop (and I can read the conditional), but I don't understand what is exactly being done in terms of this syntax
can someone explain what is going on with [for _, char := range x]
? I can't reverse-search this pattern, and I don't know what precicely is happening here
Apparently, this site's community thinks less lines of code is "better", and there's not much of an understanding of readability or maintainability for these exercises... The mindset's divorced from practical coding, by and large.
This comment is hidden because it contains spoiler information about the solution
When invoking string interpolation through
${var.function()}
Aren't we creating a new object, therefore, not mutating the original var? The declared string should be immutable in JS...I don't get the hate for this solution. It's pretty clear in terms of functionality. What's with the obsession of trying to write one-liners for everything?