Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

convert a string to array in javascript

// Designed by shola for shola

str = 'How are you doing today?';
console.log(str.split(" "));

//try console.log(str.split(""));  with no space in the split function
//try console.log(str.split(","));  with a comma in the split function
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #string #array #javascript
ADD COMMENT
Topic
Name
3+5 =