Skip to content

Instantly share code, notes, and snippets.

@jafstar
Created May 18, 2012 07:28
Show Gist options
  • Save jafstar/2723767 to your computer and use it in GitHub Desktop.
Save jafstar/2723767 to your computer and use it in GitHub Desktop.
Javascript explode() equivalent
console.log('searchVal split = ' + searchVal.split(' '));
var searchValArray = searchVal.split(' ');//.slice(1,-1);
console.log("SEARCH Array: " + searchValArray + "......");
var searchString = "";
for(var i in searchValArray){
searchString += String(searchValArray[i] + "+");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment