5 ms·
JavaScript variables are passed by reference, the variable `i` on the statement: `var msg = txt[i];` will always reference the last value after the loop has exe
by Q_the_Novice 14y ago
JavaScript variables are passed by reference, the variable `i` on the statement: `var msg = txt[i];` will always reference the last value after the loop has executed.