Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

split and join 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
 
PREVIOUS NEXT
Tagged: #split #join #javascript
ADD COMMENT
Topic
Name
8+2 =