I have looked at several posts on strings and am using this in Unity js but it doesn't seem to work. any suggestions? The idea is to have a number show up in speedD.
I have also tried var speedD = int.Parse(arrayz[0]); in the last line to assure it is returned as a number. Any help is appreciated!:)
var speedB = "10,20,30";
var arrayz = new Array ();
arrayz = speedB.Split("," [0]);
var speedD = arrayz[0];