Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 138192

How to extract only first and last name by removing the middle name using javascript

$
0
0

I am trying to display only First and Last name. Sometimes there will be a middle name comes. In that case i need remove the middle name and join first and last name.How is it possible using JavaScript. The name comes to a variable from database like

var displayname="abc pqr xyz"

i just need "abc xyz" to a variable . Thanks in advance


Viewing all articles
Browse latest Browse all 138192

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>