You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an each loop, the scoping of variables is not really handled. If a variable is declared in one iteration of the loop, it's value is kept in the following iterations
In the following example, the variable newVariable will be set to test from the beginning until the end of the loop iteration
- var array = [1,2,3,4]
each value, index in array
if index === 0
- var newVariable = 'test'
Is this a known issue?
The text was updated successfully, but these errors were encountered:
In an
each
loop, the scoping of variables is not really handled. If a variable is declared in one iteration of the loop, it's value is kept in the following iterationsIn the following example, the variable
newVariable
will be set totest
from the beginning until the end of the loop iterationIs this a known issue?
The text was updated successfully, but these errors were encountered: