Questions and Answers Latest Version
Already Passed
What function is used to draw a circle in JavaScript graphics?
✔✔ drawCircle()
How can you change the color of a shape in JavaScript graphics?
✔✔ Use setColor()
What function makes an object appear on the screen?
✔✔ add()
How do you create a rectangle in JavaScript graphics?
✔✔ Use the drawRect() function
What function sets the size of the canvas?
✔✔ setCanvasSize()
1
,How can you remove an object from the screen?
✔✔ Use remove()
What is the default background color in JavaScript graphics?
✔✔ White
How can you change the size of a circle after creating it?
✔✔ Use setRadius()
What function allows you to move a shape on the screen?
✔✔ Use move()
How can you make an object follow the mouse?
✔✔ Use mouseMoveMethod()
What function detects when the user clicks on the canvas?
✔✔ mouseClickMethod()
2
, How do you create a new text object in JavaScript graphics?
✔✔ Use new Text()
How do you change the font size of a text object?
✔✔ Use setFont()
What function allows you to animate an object?
✔✔ setTimer()
How do you check the width of the canvas?
✔✔ Use getWidth()
How can you check the height of the canvas?
✔✔ Use getHeight()
What function makes an object transparent?
✔✔ Use setOpacity()
3