const makeAbbr = words => { return words.split(' ').map(i => i[0].toUpperCase()).join('') }
const makeAbbr = words => words.trim().replace(/(\S)(\S*\s*)?/g , "$1").toUpperCase(); console.log(makeAbbr(' c a aaa w gggg bb '));