Initialize the variable
What is wrong with this code?
let circleLocation;
function setup() {
createCanvas(400, 400);
}
function draw() {
background(mouseX,100,250);
circle(circleLocation,200,50);
//console.log(mouseX);
circleLocation = circleLocation +1
}
It produces this error:
p5.js says: [sketch.js, line 9] circle() was expecting Number for the first parameter, received an empty variable instead. If not intentional, this is often a problem with scope.
What is the color?
In the following code, what color would the rectangle be?
let c = color(12, 234, 0);
fill(c);
rect(30, 20, 55, 55);