#atom
ID: JS-009
Date: [Insert Date]

Content:
Control structures allow you to alter the flow of loops and conditional statements.

break Statement:

Example:

for (let i = 0; i < 10; i++) {
    if (i === 5) {
        break;
    }
    console.log(i); // 0, 1, 2, 3, 4
}

continue Statement:

Example:

for (let i = 0; i < 5; i++) {
    if (i === 2) {
        continue;
    }
    console.log(i); // 0, 1, 3, 4
}

return Statement:

Example:

function add(a, b) {
    return a + b;
}
console.log(add(2, 3)); // 5

Connections:


Connections:


Sources: