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.
That's a great site! Thanks for the link, never heard of it before.
If you don't declare variables they are automatically global in JavaScript which is bad as it can pollute other code places or even overwrite other variables. It is done here because this code is trimmed to have as few characters as possible (don't know why they use spaces though) and it can be expected that there are no side effects.
let
andconst
only define the function in the current scope.Since function definitions normally don't change it is best to define them with
const
.What is the fundamental difference for real code, if in this decision at the very beginning you also write "let". And what is the right way?
my solution is like that
Try that in regex101.com And there is no need to ask the same three times.
What do the brackets [ ] do?
This is stupid.Give computing and repetition to a computer,This is the meaning of its birth
This comment is hidden because it contains spoiler information about the solution