wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Event Handling

Total questions: 10

Worksheet time: 3mins

Name
Class
Date
1.

What is the expansion of ASCII?

a)

American Scientific Code for Information Interchange

b)

American Standard Code for Information Interchange

c)

American Standard Code for Interchanging Information

d)

American Scientific Code for Interchanging Information

2.

What is the ASCII code value for down arrow key?

a)

38

b)

40

c)

37

d)

39

3.

When you want to draw something on the canvas, what are the two required events?

a)

mousedown and mouseup

b)

mousedown and mousemove

c)

mousemove and mouseleave

d)

mouseleave and mouseup

4.

When the width of the screen is 700, which of the events is valid

a)

mousedown

b)

touchstart

c)

mousemove

d)

all the above

5.

When you wanted to show the movement of a player and remove the image shown on the previous x and y position, which library will be helpful

a)

ml5.js

b)

p5.js

c)

fabric.js

6.

Which of the following is the correct event?

a)

keyDown

b)

keydown

c)

keyPress

d)

KeyDown

7.

What is the purpose of clearRect()

a)

sets the pixels in a rectangular area to transparent

b)

clears the specified pixels within a given rectangle

c)

to clear the canvas

d)

all the above

8.

What are the parameters passed inside the method clearRect()

a)

width,height,x,y

b)

x,y,width,height

c)

both

9.

Operators can be used for comparison

a)

= , ==

b)

== , !=

c)

=, !=

d)

all the above

10.

refers to the event when a mouse is released after click

a)

mouseleave

b)

mouseup

c)

mousemove

d)

none of the above