Control flow

Introduction

Introduction

let x = 0;
for (let i = 0; i < 10; i++) {
    x = x + i;
}

Iterating over arrays

let x = 0;
for (const e of arr) {
    x = x + e;
}