I have a user with a name Paul Steve Panakkal. It\'s a long name it won\'t fit to the div container. So is there anyway to split first name and lastname fro
const fullName = 'Paul Steve Panakkal'.split(' '); const lastName = fullName.pop(); // 'Panakkal' const firstName = fullName.join(' '); // 'Paul Steve' console.log(firstName); console.log(lastName);