Answers for "string in to array js"

14

js string to array

var myString = 'no,u';
var MyArray = myString.split(',');//splits the text up in chunks
Posted by: Guest on April-08-2020
1

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

Code answers related to "Javascript"

Browse Popular Code Answers by Language