DEV Community

Adem Deliaslan
Adem Deliaslan

Posted on

Javascript Learning From Scratch -00007

var rectWidth = 20;
rect(10, 10, rectWidth, rectWidth);

Question_0001: How wide is the rectangle?

Answer_0001: Obviously 20 :)

We're drawing eyes for a face, and we want the eyes to both be in the same y position and to be the same size. We use the following code to draw them:


var y = 70;
var size = 30;
ellipse(100, y, size, size);
ellipse(150, y, size, size);

Question_0002: At what y position are the eyes drawn?

Answer_0002: 70


Top comments (0)