SDF Chatter
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
mvmike@lemmy.ml to Memes@lemmy.ml · 2 years ago

We've all been there

lemmy.ml

message-square
21
fedilink
367

We've all been there

lemmy.ml

mvmike@lemmy.ml to Memes@lemmy.ml · 2 years ago
message-square
21
fedilink
  • illectrility@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    2 years ago

    The only right answer… But wouldn’t Name[1] be ‘e’ in this case? I would add a .split(' ') to avoid confusion.

    So the full answer would be Name.split(' ')[1]

    Why do I always over think stuff like this…

    Edit: they also shouldn’t capitalize variable names

    • ShittyKopper [they/them]@lemmy.w.on-t.work
      link
      fedilink
      arrow-up
      4
      ·
      2 years ago

      https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/

      • GTG3000@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        2 years ago

        There’s a reason I refuse to try parsing names as a string separated by spaces.

        Separate fields, bitches.

    • PeWu@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      Love me some JS brother

Memes@lemmy.ml

memes@lemmy.ml

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: !memes@lemmy.ml

Rules:

  1. Be civil and nice.
  2. Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.
Visibility: Public
globe

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

  • 910 users / day
  • 3.97K users / week
  • 7.98K users / month
  • 23.2K users / 6 months
  • 424 local subscribers
  • 50.4K subscribers
  • 14K Posts
  • 308K Comments
  • Modlog
  • mods:
  • ghost_laptop@lemmy.ml
  • sexy_peach@feddit.de
  • Cyclohexane@lemmy.ml
  • Arthur Besse@lemmy.ml
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org