mvmike@lemmy.ml to Memes@lemmy.ml · 1 year agoWe've all been therelemmy.mlimagemessage-square14fedilinkarrow-up1296arrow-down11
arrow-up1295arrow-down1imageWe've all been therelemmy.mlmvmike@lemmy.ml to Memes@lemmy.ml · 1 year agomessage-square14fedilink
minus-squareillectrility@lemmy.worldlinkfedilinkarrow-up5·edit-21 year agoThe 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
minus-squareShittyKopper [old]@lemmy.w.on-t.worklinkfedilinkarrow-up2·1 year agohttps://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/
LastName = Name[1]
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
https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/
Love me some JS brother