Answers for "javascript get first letters of every word in sentence"

0

javascript get first letter of each word

var msg = "Name Surname a"
var acronym = msg.match(/b(w)/g).join('');

console.log(acronym)
Posted by: Guest on January-07-2021
1

js get words first letter

var str = "Java Script Object Notation";
var matches = str.match(/b(w)/g); // ['J','S','O','N']
var acronym = matches.join(''); // JSON

console.log(acronym)
Posted by: Guest on April-12-2020

Code answers related to "javascript get first letters of every word in sentence"

Code answers related to "Javascript"

Browse Popular Code Answers by Language