Question: 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.

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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!