• Test_Tickles@lemmy.world
    link
    fedilink
    arrow-up
    7
    arrow-down
    2
    ·
    edit-2
    16 hours ago

    Dude, there are at least 4 different “for” loop syntaxes in Js/Ts alone:

    for (let num = 1; num <= 5; num++) {}.

    for (const num of numbers) {}.

    for (const num in numbers) {}.

    this.numbers].forEach(num => {});

    Also don’t forget ngFor and @for in html, and then the @for in sass/scss.

    That’s 7 different for loops and I haven’t included the non-for loops, or even left Angular.

    Once we include some scripting like I did just this week:

    bash: for i in {1…5}: do … done

    dos: for /L %%i in (1,1,5) do ()

    Then you can just stfu if I feel the need to remind myself of the exact syntax for one of the 3 or 4 different for loop options in c#.