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.
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?