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
const s="awss, szjsjsjs, sjsjsj"
console.log(s.split(", ").join("_apoorv_"))
// prints awss_apoorv_szjsjsjs_apoorv_sjsjsj
// Note they are same as python ones in terms of functionality
// only syntax of join is a little diffrent than it's pythonic counterpart
/* 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