I'm just curious how I go about splitting a variable into a few other variables.
For example, say I have the following JavaScript:
var coolVar = '123-abc-itchy-knee';
And I wanted to split that into 4 variables, how does one do that?
To wind up with an array where
array[0] == 123
and
array[1] == abc
etc would be cool.
Or (a variable for each part of the string)
var1 == 123
and
var2 == abc
Could work... either way. How do you split a JavaScript string?