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.
The goal was not to rewrite the code, just make it work. But of course, this one is much clearer than the previous one.
I know this gets you to pass the test, but I feel like this goes against the spirit of the kata, which was to debug the errors present.
I guess at the end of the day, if it passes the validation, its correct.
good point thank you
You don't need second if statement. If n === 1, it will be triangular(0) + 1 which is 1.