Answers for "how to find first letter javascript"

2

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 "how to find first letter javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language