Answers for "javascript text to array"

2

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
Posted by: Guest on January-17-2021
0

javascript text to array

var str = "How are you doing today?";
var res = str.split(" ");
Posted by: Guest on January-20-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language