What is Join() in jquery? for example:
var newText = $(\"p\").text().split(\" \").join(\" \");
I use join to separate the word in array with "and, or , / , &"
"and, or , / , &"
EXAMPLE
HTML
London Mexico Canada
JS
newText = $("p").text().split(" ").join(" or "); $('div').text(newText);
Results
London or Mexico or Canada