Bit Goblin/Lemmy
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@lemmy.world to Programmer Humor@programming.dev · 3 天前

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 天前
message-square
159
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
  • grue@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    3 天前

    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 天前

      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
        ·
        3 天前

        This is how we end up with an endian schism

    • FooBarrington@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      3 天前

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

    • anton@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      3
      ·
      3 天前

      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.

  • 1.46K users / day
  • 5.74K users / week
  • 9.89K users / month
  • 15.8K users / 6 months
  • 1 local subscriber
  • 23.9K subscribers
  • 1.44K Posts
  • 46K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.7
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org