Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js get words first letter

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

console.log(acronym)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #words #letter
ADD COMMENT
Topic
Name
1+9 =