var msg = "Name Surname a"
var acronym = msg.match(/(w)/g).join('');
console.log(acronym)
let myStr = "Hello World"
let firstWord = myStr.split(" ")[0]
let sentence = "The big brown fox"
let word = sentence.split(" ")[0]
console.log(word) // The
let string = "Hello World"
let firstWord = typeof string.split(" ")[0] !== 'undefined' ? string.split(" ")[0] : null;
var str = "Java Script Object Notation";
var matches = str.match(/(w)/g); // ['J','S','O','N']
var acronym = matches.join(''); // JSON
console.log(acronym)