lemmy.4d2.org
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@lemmy.world to Programmer Humor@programming.dev · 3 months ago

JavaScript

message-square
19
link
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
19

JavaScript

cm0002@lemmy.world to Programmer Humor@programming.dev · 3 months ago
message-square
19
link
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
  • Avid Amoeba@lemmy.ca
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    3 months ago

    This is too stupid so I had to check.

    Fuck me.

    • Gsus4@mander.xyz
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      3 months ago

      Hm, playing devil’s advocate, I think it is because the minus has not been defined as a string operation (e.g. it could pop the last char), so it defaults to the mathematical operation and converts both inputs into ints.

      The first is assumed to be a concat because one of the parcels is a string…

      It’s just doing a lot of stuff for you that it shouldn’t be in first place 🤭

      • Avid Amoeba@lemmy.ca
        link
        fedilink
        arrow-up
        1
        ·
        3 months ago

        Yup. It’s completely inconsistent in its interpretation of the + operator.

    • irelephant [he/him]@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      pro tip:

      "ba" + 0/0 + "a"
      
      • 𝕨𝕒𝕤𝕒𝕓𝕚@feddit.org
        link
        fedilink
        arrow-up
        1
        ·
        3 months ago

        This has got to be baNaNa

        • MaggiWuerze@feddit.org
          link
          fedilink
          arrow-up
          1
          ·
          3 months ago

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 519 users / day
  • 3.04K users / week
  • 9.31K users / month
  • 13.3K users / 6 months
  • 6 local subscribers
  • 26K subscribers
  • 661 Posts
  • 9.64K Comments
  • Modlog
  • mods:
  • adr1an@programming.dev
  • Feyter@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org