cap SyntaxError: Unexpected identifier
function getDots(){
Dots = [];
for (var i = 0;i<size; i++) {
var x = random(0, width);
var y = random(0,height);
var color = "rgb("+random(0,255)+","+random(0,255)+","+random(0,255)+")";
Dots.push({
x:x,
y:y,
color:color
cap: 0 //------------>问题:为什么这个地方会出现错误:SyntaxError: Unexpected identifier
});
}
}