Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js split string

var myString = "Hello World!";

// splitWords is an array
// [Hello,World!]
var splitWords = myString.split(" ");

// e.g. you can use it as an index or remove a specific word:
var hello = splitWords[splitWords.indexOf("Hello")];
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #split #string
ADD COMMENT
Topic
Name
5+2 =