We've all been there
We've all been there
We've all been there
You're viewing a single thread.
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
There's a reason I refuse to try parsing names as a string separated by spaces.
Separate fields, removed.
Love me some JS brother
Could be the middle name though, better use name[name.length-1]