Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript get first letter of each word

var msg = "Name Surname a"
var acronym = msg.match(/(w)/g).join('');

console.log(acronym)
Comment

get first word in javascript

let string = "Hello World"

let firstWord = typeof string.split(" ")[0] !== 'undefined' ? string.split(" ")[0] : null; 
Comment

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)
Comment

PREVIOUS NEXT
Code Example
Javascript :: convert number to array javascript 
Javascript :: moment check days of difference between days 
Javascript :: jquery calc height based on width 
Javascript :: js money format br 
Javascript :: react-native-paper resize switch resize 
Javascript :: Format number thousands k javascript 
Javascript :: javascript letters as number 
Javascript :: jquery delete a cookie 
Javascript :: mongoose.connect 
Javascript :: check if there is data in localstorage 
Javascript :: clear screen in js 
Javascript :: javascript fillstyle 
Javascript :: time difference in minutes in JS 
Javascript :: javascript excel column letter to number 
Javascript :: onclick add class javascript 
Javascript :: angular declare variable in a file 
Javascript :: sweetalert angular 8 
Javascript :: How to save input from box html 
Javascript :: asyncstorage react native 
Javascript :: javascript change all anchors color 
Javascript :: sort array of objects javascript by value 
Javascript :: window location redirect javascript 
Javascript :: how to get parameter url js 
Javascript :: javascript parentnode 
Javascript :: reactjs router link props 
Javascript :: discord js duplicate channel 
Javascript :: html canvas draw base64 image 
Javascript :: javascript returned function and copy to clipboard 
Javascript :: username validation formik react yup 
Javascript :: how to convert new date to dd/mm/yyyy format in javascript 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =