Answers for "how to split a name js"

1

how to split a name js

var firstName = fullName.split(' ').slice(0, -1).join(' ');
var lastName = fullName.split(' ').slice(-1).join(' ');
Posted by: Guest on June-10-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language