Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Javascript Basics (Khan Academy)

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.
What is at the end of a line of code?
a)
#
b)
;
c)
)
d)
>
2.
What command draws a rectangle?
a)
rec (10, 20, 100, 200);
b)
rect (10, 20, 100, 200)
c)
rect (10, 20, 100, 200);
d)
ellipse (10, 20, 40, 40)
3.

The x and y parameters for ellipses and rectangles control the shape's

a)

position

b)

size

c)

radius

d)

color

4.

The x and y parameters of an ellipse control the position of the shape's

a)

centerpoint

b)

top left corner

c)

top right corner

d)

radius

5.

The x and y parameters of a rectangle control the position of the shape's

a)

centerpoint

b)

top left corner

c)

top right corner

d)

radius

6.

The point (0, 0) on the Khan Academy JS canvas is located at the

a)

top right corner

b)

top left corner

c)

bottom right corner

d)

bottom left corner

7.
What command draws a perfect circle?
a)
ellipse (80, 60, 100, 105);
b)
ellipse(80, 60, 100, 100);
c)
circle (80, 60, 80, 60):
d)
ellipse (80, 60, 105, 100);
8.

The (x, y, w, h) in a command are called "parameters".

a)

True

b)

False

9.

The 'X' parameter

a)

moves the object left and right

b)

moves the objectup and down

c)

changes with width

d)

changes the height

10.

The 'Y' parameter

a)

moves the object left and right

b)

moves the object up and down

c)

makes the object wider or thinner

d)

makes the object taller or smaller

11.

The 'W' parameter

a)

moves the object left and right

b)

moves the object up and down

c)

makes the object thicker or thinner

d)

makes the object taller or shorter

12.

The 'H' parameter

a)

moves the object left and right

b)

moves the object up and down

c)

makes the object wider or thinner

d)

makes the object taller or shorter

13.

What symbols do you use to write a comment in your code?

a)

()

b)

;

c)

//

d)

\\

14.

In the following line of code - rect(200, 150, 50, 120); What does the first number (200) stand for?

a)

X

b)

Y

c)

W

d)

H

15.

In the following line of code - rect(200, 150, 50, 120); What does the last number (120) stand for?

a)

X

b)

Y

c)

W

d)

H