JSFiddle - React, Tailwind, and code Playground
by ruhul105
JavaScript
const getAcronym = (str) => {
console.log('str:', typeof str)
if(!str || typeof str === undefined ){
return
}
var matches = str.match(/\b(\w)/g);
return matches.join("");
}
console.log(getAcronym('The Ultrawellness Center'))