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.
oooooh
The original language for this kata is Java which requires code to be in classes, the js translator would then have included that in the translation which later got recognized as a mistake and was removed. So this solution is (probably, I didn't check dates) from before that change. And if that change was relatively recent then there will be many solutions with the class included.
Ok, I agree.
Why is everyone turning this into a class?
That's a design decision you have to make for yourself when writing code. Here on a specialized coding problems site where each kata is specifics-bounded and undefined behavior doesn't matter, it doesn't. In real world where you should have more failsafes, you should. Also you're posting a spoiler, you need to mark it as spoiler.
This comment is hidden because it contains spoiler information about the solution
I we are working only based on task desc :)
same
Finally I solved this kata
Yeah but your comment made me think what actually this method does behind the scene?
Thats crazy how toString method returns binary when given 2 as the input!
That is amazing.
Cool solution 👍.
Great difference in the basic solution! I think the default way they want you to complete it is great at showing different function scopes, but this is definitely the better way to complete this simple task
Good
Nice solution! I'm now just learning about for...of loop so i used that one
Loading more items...