var array = ["Charizard,Pikachu,Glalie,Delfox"];
I tried to use the split()
method except that only affects string variables and not arrays.
My ultimate goal is to make array = ["Charizard","Pikachu","Glalie","Delfox"];
var array = ["Charizard,Pikachu,Glalie,Delfox"];
I tried to use the split()
method except that only affects string variables and not arrays.
My ultimate goal is to make array = ["Charizard","Pikachu","Glalie","Delfox"];
You can retrieve the value of the array an split it using as delimiter the comma ','
var array = ["Charizard,Pikachu,Glalie,Delfox"];
console.log(array[0].split(','))