Variables in for loops - mmedrano9438/peripheral-brain GitHub Wiki
for statement creates a loop that consists of three optional expressions, enclosed in parentheses and separated by semicolons, followed by a statement (usually a [block statement] to be executed in the loop.
let str = '';
for (let i = 0; i < 9; i++) { str = str + i; }
console.log(str); // Expected output: "012345678"
///////////////example in english... let str = '';
for (let i = 0; i < 9; i++) { str = str + i; }
console.log(str); // Expected output: "012345678"