An earlier routine has assembled a text string “string” with an unknown number of elements. I want to turn it into an array and then pop the final element. Therefore I use this code:
var string = "white,blue,red,green";
var myArray = new Array(string);
var lastelement = myArray.pop();
application.output(lastelement); // produces "white,blue,red,green" when I expected just "green".
What’s going on here? I’m misunderstanding the required syntax.