Hacker News new | ask | show | jobs
by edflsafoiewq 2808 days ago
JS's scope is really weird

    for (let i = 0; i != 3; i += 1) {
        console.log(i); // i refers to the variable defined below
        const i = 0;
    }