Ponder.cat
  • Communities
  • heart
  • search
    • Login
    • Sign Up
    • Communities

    • heart
      Support Lemmy
    • search
      Search

    • Login
    • Sign Up
    cm0002@lemmy.world to Programmer Humor@programming.dev · 20 days ago

    JavaScript

    lemmy.ml

    message-square
    157
    fedilink
    • cross-posted to:
    • programmerhumor@lemmy.ml
    1.04K

    JavaScript

    lemmy.ml

    cm0002@lemmy.world to Programmer Humor@programming.dev · 20 days ago
    message-square
    157
    fedilink
    • cross-posted to:
    • programmerhumor@lemmy.ml
    • r00ty@kbin.life
      link
      fedilink
      arrow-up
      15
      ·
      20 days ago

      Should it, or should it be “1”? (just removing one, one)

      • grue@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        20 days ago

        Which “1” did it remove? And did it search the string to find a “1” to remove, or did it remove whichever character happened to be at array index 1?

        • ⛓️‍💥@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          12
          ·
          20 days ago

          The one at the end. Subtraction is the opposite of addition. If addition adds a character to the end of the string, it must follow that subtraction would remove a character from the end of the string.

          • Revan343@lemmy.ca
            link
            fedilink
            arrow-up
            4
            ·
            20 days ago

            This is how we end up with an endian schism

        • FooBarrington@lemmy.world
          link
          fedilink
          arrow-up
          4
          ·
          20 days ago

          It should just randomly pick any “1”. Add a bit of spice, you know

        • anton@lemmy.blahaj.zone
          link
          fedilink
          arrow-up
          3
          ·
          20 days ago

          maybe we removed the last n characters

    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.

    • 134 users / day
    • 3.3K users / week
    • 9.85K users / month
    • 18K users / 6 months
    • 1 local subscriber
    • 24.4K subscribers
    • 913 Posts
    • 16.3K Comments
    • Modlog
    • mods:
    • adr1an@programming.dev
    • Feyter@programming.dev
    • BurningTurtle@programming.dev
    • Pierre-Yves Lapersonne@programming.dev
    • UI: unknown version
    • BE: 0.19.8
    • Modlog
    • Instances
    • Docs
    • Code
    • join-lemmy.org