@[email protected] to [email protected] • 1 year agoWe've all been therelemmy.mlimagemessage-square21fedilinkarrow-up1564arrow-down19
arrow-up1555arrow-down1imageWe've all been therelemmy.ml@[email protected] to [email protected] • 1 year agomessage-square21fedilink
minus-squareillectrilitylink9•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 [they/them]linkfedilink4•1 year agohttps://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/
minus-squareGTG3000linkfedilink1•1 year agoThere’s a reason I refuse to try parsing names as a string separated by spaces. Separate fields, bitches.
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/
There’s a reason I refuse to try parsing names as a string separated by spaces.
Separate fields, bitches.
Love me some JS brother