Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

js get initials from name

const fullName = nameString.split(' ');
const initials = fullName.shift().charAt(0) + fullName.pop().charAt(0);
return initials.toUpperCase();
Comment

PREVIOUS NEXT
Code Example
Javascript :: installing jQuery in react js 
Javascript :: how to set element readonly using jquery 
Javascript :: ejs if else 
Javascript :: apex charts cdn 
Javascript :: fs renaming files 
Javascript :: number with commas js 
Javascript :: call a function on load jquery 
Javascript :: socket io cdn 
Javascript :: jquery check if element has css display none 
Javascript :: dom ready js 
Javascript :: datatables clear table 
Javascript :: box shadow react native 
Javascript :: javascript roman to integer 
Javascript :: creat react app 
Javascript :: javascript check if object is empty 
Javascript :: pick a random element from an array javascript 
Javascript :: count child elements javascript 
Javascript :: js scroll to bottom 
Javascript :: express js clear cookie 
Javascript :: link next js target _blank 
Javascript :: check comma in string javascript 
Javascript :: pass csrf token in ajax laravel 
Javascript :: javascript biggest number 
Javascript :: call a function when page loads javascript 
Javascript :: get value onChange from mat-select angular 
Javascript :: puppeteer wait for page load 
Javascript :: define reason in discord.js 
Javascript :: javascript round decimal 2 digits 
Javascript :: js update query string 
Javascript :: html string to html 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =