• ook@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    6
    ·
    2 days ago

    Easy. You got 1 and 2, which is obviously 12. Then you add 3, because it is a sum, so 15 comes out. Don’t forget to like and subscribe!

    • e0qdk@reddthat.com
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 days ago

      Almost works in JS. +("1" + 2) + 3 is 15, and "1" + 2 - -3 is 15, but "1" + 2 + 3 is “123”. 🙄️

      • boonhet@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 days ago

        I’m still not convinced Javascript is a serious language rather than a prank.