📜  显示名称首字母缩写词 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:19.040000             🧑  作者: Mango

代码示例1
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)