Upvote!
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@lemmy.world to Programmer Humor@programming.dev · 3 days ago

JavaScript

lemmy.ml

message-square
159
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
1.02K

JavaScript

lemmy.ml

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

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

    • grue@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      3 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
        ·
        3 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
          cake
          link
          fedilink
          arrow-up
          4
          ·
          3 days ago

          This is how we end up with an endian schism

      • FooBarrington@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        3 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
        ·
        3 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.

  • 3.99K users / day
  • 6.41K users / week
  • 10.1K users / month
  • 19K users / 6 months
  • 1 local subscriber
  • 23.9K subscribers
  • 1.39K Posts
  • 46.8K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.6
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org