Answers for "how to rearrange a string in js using split and join"

3

javscript .split().reverse.join

"this is a test string".split("").reverse().join("");
Posted by: Guest on June-05-2020
2

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
Posted by: Guest on June-07-2021

Code answers related to "how to rearrange a string in js using split and join"

Code answers related to "Javascript"

Browse Popular Code Answers by Language