You're viewing a single thread.
All Comments
21 comments
LastName = Name[1]
17 1 ReplyThe 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
9 0 ReplyThere's a reason I refuse to try parsing names as a string separated by spaces.
Separate fields, bitches.
1 0 Reply
Love me some JS brother
1 0 Reply
Could be the middle name though, better use name[name.length-1]
2 0 Reply
21 comments
Scroll to top