Answers for "show the first letters from a word js"

5

get first word of string js

let myStr = "Hello World"
let firstWord = myStr.split(" ")[0]
Posted by: Guest on March-14-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 "show the first letters from a word js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language