DEV Community

Adem Deliaslan
Adem Deliaslan

Posted on

1 1

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)

SurveyJS custom survey software

Build Your Own Forms without Manual Coding

SurveyJS UI libraries let you build a JSON-based form management system that integrates with any backend, giving you full control over your data with no user limits. Includes support for custom question types, skip logic, an integrated CSS editor, PDF export, real-time analytics, and more.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay