Hello all,
I was wondering if there happens to be a comprehensive guide on proper JavaScript syntax for GlowScript. My prior experience in programming mostly comes from taking AP Computer Science Principles, which I believe uses JavaScript. I am currently trying to create a set of three points with a randomly generated x/y coordinate pair, and so far I have come up with this:
let numListX = [ ];
for (let i = 0; i < 3; i++) {
let NumX = randomNumber(0, 320);
appendItem(numListX, NumX);
}
let numListY = [ ];
for (let i = 0; i < 3; i++) {
let NumY = randomNumber(0, 450);
appendItem(numListY, NumY);
}
for (let i = 0; i < 3; i++) {
points(pos:[vector(numListX,numListY[i],0)], radius=50, color:color.red)
}
I have mostly created this in Code.org and copied/pasted it into GlowScript with a few tweaks. When it is run, I receive an unexpected token error. How should I best approach solving this issue?
Thanks for your time and help, and take care!