contestada

This program displays an array of stars based on two arrays, one of x positions and one of y positions. Add another star by adding a new
number to each array.
var XPositions = [100];
var yPositions = [200];
function() {
4 var drawStars =
background (9, 5, 59);
7-
B
12345678901234567
11
10 ];
}
imageMode (CENTER);
for (var i = 0; i image (getImage("space/star"), XPositions[i], yPositions[i], 30, 30);
12 mouseClicked-function () {
XPositions.push(mousex);
yPositions.push(mousey);
13
14
15
drawStars();
16
};
17