1const fullName = nameString.split(' ');
2const initials = fullName.shift().charAt(0) + fullName.pop().charAt(0);
3return initials.toUpperCase();
1var str = "Java Script Object Notation";
2var matches = str.match(/\b(\w)/g); // ['J','S','O','N']
3var acronym = matches.join(''); // JSON