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.
Nice Kata - appears simple but the large numbers cause some great alternative thinking on the python solutions. Thank you
Good afternoon,
Im no expert, but const is not changeable once it is declared, so if it is declared in the scope of the whole function, it will be set once and then not change for the duration of the function.
If the const is declared inside the while loop, for each loop the const will be declared as a new variable, and when it cycles to the next loop it is recreated.
Does this work if you change the const above the while loop to 'let'?
What language are you trying to learn?
Am I missing something, the console log for n is 7 and it says expected a result of '8' and a log of 13 expects '16'. That is not correct when reading the description. Unless I am missing something fundamental?
This comment is hidden because it contains spoiler information about the solution