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.
don't use not useful comments!
the real hero here is your commenting
There's no type coercion in
string > string
.Would it be good practice to convert to a number if you plan on working with TypeScript or if you don't want type-coersion related bugs in your code?
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
Thank you for the comments.
It really makes it a lot easier to understand without having to google everything first.
Still gonna google it to get the finer details, but I don't have to before I can understand what's happening.
The string comparison is comparing the first digit, and 5 is greater than 1, so it terminates the comparison. If they were equal it would proceed to the next digit.
Thank u for explaining!
There is no defference, they use the same algorithm.
This comment is hidden because it contains spoiler information about the solution
Not sure. Show your whole code.
Why I am getting this?:
Strange. Till I don't use "String(digits)", I got "substr is not a function".
This comment is hidden because it contains spoiler information about the solution
I adjusted that. Also the solution was in the preloaded code with the same namespace as the tests.
So the tests were always using the preloaded solution instead of the user solution which has no namespace.
Loading more items...