• kopi-pasted@incremental.social
      link
      fedilink
      arrow-up
      2
      ·
      5 months ago

      The code is for an incremental RPG programming game called Bitburner, which uses a version of JavaScript that has some additional game-specific APIs and restrictions (the game originally ran in a web browser)

      This code in particular is a (flawed) solution to the first problem the game throws at you, which is finding a way to hack as much in-game money as possible from in-game servers. (The problem is more complicated than it appears at first glance, and I’ll try to elaborate if you ask.)

      Urghh, now I must post before I leave…

    • Metype @lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 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++)