Sending a Geogebra List or Array to JavaScript
ggbApplet.evalCommand("list=Sequence(RandomBetween(-10, 10),i,1,RandomBetween(2,10))");
ggbApplet.evalCommand("n=Length[list]");
var n= ggbApplet.getValue("n");
var aA= new Array();
for (var i = 1; i <=n; i++ ){
ggbApplet.evalCommand("a=Element[list,"+ i+"]");
a = ggbApplet.getValue("a");
aA.push(a);
}
alert(aA.join());