Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In javascript (arrays) You should create a function drawFigure(x,y,color,circle), in which you need to create a square and a circle. If in the console you

In javascript (arrays)

You should create a function drawFigure(x,y,color,circle), in which you need to create a square and a circle. If in the console you write drawFigure(150,200,"red",true), it should display a red circle located in 150, 100. Or if drawFigure(100, 100,"blue",false) it should display a blue square located in 100,100. The circle should be 20 px of radius and rectangle (25,20).

Another function that displays randomly between 5 and 15 the amount of figures when you open the output

Another function that displays all the parameters in drawFigure(x,y,color,circle) randomly

And finally make the buttons work, when clicking the "move ball left" button, it should move the circles 10 px to the left, or to the right if click the other button, same with the rectangles.

image text in transcribed

image text in transcribed

Move

Movement

Movement O O Move Ball Left Move Ball Right Move Square Left Move Square Right

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions

Question

=+2. Identify and analyze your audience.

Answered: 1 week ago

Question

=+3. Define the main idea.

Answered: 1 week ago