When we create a loop for
in any language, sometimes we don't understand the lines and variables that we develop and why we create them.
Example:
When we create an initial variable (example i
) we understand that it is the hint (better known as index
) of an array or object.
for (let i = 0; i < length; i++) //here your code loop
When we make this sentence (most of the programmers and I include myself) we do not understand.
Why the sign in
<
our loop? What logic represents that the variableíndice
is less than the number of times to repeat?