• LiPoly@lemmynsfw.com
    link
    fedilink
    arrow-up
    14
    ·
    2 months ago

    Tell me you’re a JavaScript StackOverflow copy-pasta noob without telling me you’re a JavaScript StackOverflow copy-pasta noob.

    • Gamma@beehaw.org
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 months ago

      I actually had a bug in a game jam freshman year because of this. It was java, so there was a lot of questionable decisions going on, but adding the semicolon fixed it!

    • Eranziel@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      2 months ago

      Semicolons are technically optional in JS, but there are some rare cases where omitting them can result in different behaviour.

      And this is why you should enforce code style, kids. Preferably with an automated tool.

  • tatterdemalion@programming.dev
    link
    fedilink
    arrow-up
    7
    ·
    2 months ago

    This type of shit makes me aware that there really are devs that don’t care about efficiency and will spend weeks on some really novice shit because their tools and skills are bad.