1var str = "Java Script Object Notation";
2var matches = str.match(/\b(\w)/g); // ['J','S','O','N']
3var acronym = matches.join(''); // JSON
4
5console.log(acronym)
1var msg = "Name Surname a"
2var acronym = msg.match(/\b(\w)/g).join('');
3
4console.log(acronym)