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.
hm... didn't think that such a simple pattern would work. but okay i guess.
ts so smart i love ts ❤️
I am hella scared of lamda.
thank you for your suggestion :) (mine looks same as him)
this kata is more than 10 years old. Classes were introduced in ES2015. (by the way, classes are no longer merely syntactic sugar for prototypal objects; private class features for instance can hardly be emulated with pre-ES2015 JavaScript)
why not use a class? I get that a class is just syntactical sugar and it's doing this under the hood but why do it like this?
I'll say, but keep in mind that this approach is more concise and efficient than your method, especially for larger numbers.
Wow... that's insane
Good one with the prototype. but if the object will be created with the class, the prototype is created automatically.
You are right. I know you are not supposed to 'invent the wheel again' but this exercise is great to learn algorithmic thinking and complex concepts like recursion.
I think it's better to use this space to do what you wanted to do at first. This is a great exercise to understand and practice algorithms and recursion
let totalGoals = 58; is enough 🤣😂
yeah that's the way she goes sometimes. i do these challenges just to nail into my brain the kinds of built in functions you can use, because I hate doing what you did and realizing I spent so much time for no reason. A good rule of thumb is that for 7/8 kyu problems, you generally don't have to reinvent any wheels.
dont need use return if function wrote in 1 line
You are very correct!
The current implmentation did not account for when number is equal 0
Loading more items...