Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

split in javascript

/* split methods splits string object into array of strings  
and join method changes element of array into a string */
const name= "Shirshak Kandel"
const nameWithDash=name.split(" ").join("-")
console.log(nameWithDash);//Shirshak-kandel
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #split #javascript
ADD COMMENT
Topic
Name
7+6 =