Hacker News new | ask | show | jobs
by wging 730 days ago
Fun(?) fact: it's not technically true that const can't be used in for loops:

    for (const i = 0; i > 0; ) {
        console.log('this is stupid');
    }

    let ran = false;
    for (const i = 0; !ran; ran = true) {
        console.log('this is also stupid');
    }