Answers for "js str to arr"

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
4

javascript slice string from character

var input = 'john smith~123 Street~Apt 4~New York~NY~12345';

var fields = input.split('~');

var name = fields[0];
var street = fields[1];
Posted by: Guest on June-28-2020
0

string to array in js

Object.assign([], 'string').bold;
// (method) String.bold(): string
Posted by: Guest on February-16-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language