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.
I just would add parentheses for clarity
Cool to know these operators do stuff in JS.
beautiful
@Kirby Douglas Ellingson, since you want this site to live up to its potential, why don't you engage in the meta community, in Discord, on Github, in the kata and translation reviewing process, and so on? We could use some Eternal Optimists ;)
You are ablsolutelly correct @IThinkThatsKirby. Nonetheless, the goal of the Codewars project is not to teach that or another language (AFAIU from ToC), but to give a platform. You are right, some warriors provide comments to their solutions, however that's not the rule.
In case you are eager to find explanetions to solutions, you might google it. There are some on YouTube, GitHub, dev.to, etc.
At least, I put my point of view at this topic.
I am sorry, I meant, where is the code comments explaining what this does. What i really really ment was, why is this website not living up to my expectations. I see no code comments and single letter variables EVERYWHERE and it's up voted as best practices instead of clever. I am Eternal Optimist and it's like nails on a chalkboard to me. I want this site to be more than it is, I want this site to be what it could be. But back on topic. A line code explaining which way it sorts and how would be nice and best practice.
Would you please be so kind to eleborate your stayement, namely "where [is the] documentation."?
I am not absolutely sure that I am clearly understand you.
where documentation.
Fixed
Go version is missing package declaration
While this solution is clever I cannot see how it warrants the best practice up votes as this problem can easily be solved without any conversions between strings and integers.
Fixed
The go version returns an error as the second value and imports the
errors
package -- both of these are unnecessary. First, if you don't use theerrors
package the code fails to compile. Second, I see no reason for theerror
value as the tests don't test for it and there are no requirements to return errors. In fact it's so useless you can change the signature toDative(word string) string
and the tests still pass.I experienced a similar issue but it was because I was modifiying the input slice with an in-place filter. When I switched to a secondary slice for the return values the problem went away as you would expect.
The description has a link to the wikipedia article on summation at the bottom which should help. This kata is far easier than the level suggests so don't over think it.
Loading more items...