Answers for "js find first letters"

12

javascript get first character of string

var str="Hello Folks!"
var firstStringChar = str.charAt(0); //H
Posted by: Guest on August-01-2019
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"

Browse Popular Code Answers by Language