Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

split text and join in js

const myText = "It is a long established fact that a reader will"
const newText = myText.split(" ").join("-")
console.log(newText);//It-is-a-long-established-fact-that-a-reader-will
 
PREVIOUS NEXT
Tagged: #split #text #join #js
ADD COMMENT
Topic
Name
4+3 =