Published
- 1 min read
js get initials from name
The solution for this is noted below
js get initials from name
Solution
const fullName = nameString.split(' ');
const initials = fullName.shift().charAt(0) + fullName.pop().charAt(0);
return initials.toUpperCase();
Try other methods by searching on the site. That is if this doesn’t work