• @ProgrammingSocks
    link
    84 months ago

    What the fuck kind of JavaScript fuckery is for (; ; i++)

    • Metype
      link
      fedilink
      English
      104 months ago

      i is already initiated so the first statement isn’t necessary so it’s empty.

      The loop is ended with a conditional break statement so the loop end criteria isn’t necessary so it’s empty.

      We want each iteration to increment i so it’s i++

      That’s how you end up with (;;i++)