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.
This comment is hidden because it contains spoiler information about the solution
We can.
Correct syntax would be
this.valueOf = () => value
.Very cute.
I'm a beginner too, starting out in Ruby as my first language. However, before starting on Codewars, I completed the entire 9-hour length tutorial on Codecademy, as well as had some experience in trying to write some simple methods.
I feel like Codewars really is a place to test your skills and find out your limits while trying to push them and learn about better ways to code than the ways you are used to. It acts as a supplement for your own learning of the language(s) (full blown-out tutorial series, or books/manuals) rather than replacing it altogether. So, if you find that you are starting to have trouble with katas frequently, it means you have to start doing some homework I guess? (which is the state I'm approaching now)
After all, you don't go to battle without first sharpening your weapons! (or firming up your moves)
To be completey honest, I think it should be a different kata level too. The way kata ranking works, or at least how they worked when I created this, is by beta testers input. As it happens, I think people that already knew some node.js decided to beta test this, and to them, it was really easy thus the rank 7.
Both of these are solid suggestions. Hint's has been something in perspective for a while, just requires a decent amount of work, especially on the side of updating all the content with info. @Skrewtape, great points on kata creation guidelines, that's much more immediately actionable.
functions are objects, so we are defining the function Singleton and additin a propery 'a'. I've called it 'a' to make a point that its arbitrary, could be named anything. sometimes people name this property instance or instance which makes it look like there is some magic going on, when its not.
So when the funciton is called the first time and 'a' is undefined/falsy we'll store the function in a. So we are storing a reference to the function in a field on the same function, sounds a bit weird but it allows us to consitently return the same (functon) object is all subsequent calls.
Having just dipped my toe into trying to learn Clojure using this site, I understand completely. I think a "hint" system is a great idea, but I think there are a few even simpler things that could be done to make the easier katas more approachable to people who are just learning the language. For example, it should be more clear which test is failing, and the kata author could include hints in the test error messages.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Explain.
I started counting and determined that there were too many for me to count. Countless!
Unless you cheat with admin powers :P
Well to be fair, there are about ~1436 solutions - so its not exactly countless
Yes, this kata has been completed 1436 times. Countless solutions for it have been submitted.