Hi,
I'm trying to set up a stack question where I want to loop through arrays of koordinates "xo,yo" (which are going to be randomised later) to display points in JSXGraph,
but have trouble with the variables i'm using, specially with the increment variable "i".
What am I doing wrong here.
Thanks in advance for any help.
Best regards Ralf
Stack Variables:
k: 5;
xo: [1,2,3,4,5];
yo: [-2,-1,0,1,2];
Question Text:
jsxgraph
var board = JXG.JSXGraph.initBoard(divid, {axis: true, showCopyright: false, boundingbox: [-1,6,6,-1]});
function islessthan(a,b) {return Object.is((a-b)%1,-0);}
for (let i=0; islessthan(i,{#k#}); i++) {var P = board.create('point', [{#xo[i]#},{#yo[i]#}]);} /*not working*/
for (let i=0; islessthan(i,{#k#}); i++) {var P = board.create('point', [{#xo[4]#},{#yo[4]#}]);} /*works for certain number*/