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.
As the returned value is not an integer but a number, the "+i" instead of "i" is useless.
"double" is never reaffected, so you should have used "const" instead of "let".
Assuming "i" is not an integer but a number and the function returns a number, the "Math.round()" is useless here.
As "doubled" is never reaffected, it should be declared with "const" instead of "let".
As it is in TypeScript, the "var" keyword should be avoided.
No need to reaffect the result into "i".
"num" is never reaffected, so a "const" instead of a "let" should be used.
This comment is hidden because it contains spoiler information about the solution
As we are in TypeScript, the TypeScript string type should be used.
Spaces are also the key for a readable piece of code.
In order to not confound the ' and the backtick in Typescript, the " symbol should be used instead.
The "==" should be "===", in order to be the strictest possible.
Since it is TypeScript, which is strongly typed, 'position' should have a type.
The ternary notation returning strings (even more with template literals) should be avoided for maximized clarity.