wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

10.QZ JS Review

Total questions: 42

Worksheet time: 21mins

Name
Class
Date
1.

What is the shortcut for this line of code?

sunSize = sunSize + 10;

a)

sunSize += 10;

b)

sunSize -= 10;

c)

sunSize ++ 10;

d)

sunSize -- 10;

2.

What is the shortcut for this line of code?

x += 1;

a)

x = x +1;

b)

x = x - 1;

c)

x ++;

d)

x --;

3.

What is the shortcut for this line of code?

leftX = leftX - 10;

a)

leftX -= 10;

b)

leftX += 10;

c)

leftX -- 10;

d)

leftX ++ 10;

4.

What is the shortcut for this line of code?

x = x + 2;

a)

x += 2;

b)

x -= 2;

c)

x ++;

d)

x --;

5.

Which parameter controls the x-position?


ellipse ( param1, param2, param3, param4 );

a)

param1

b)

param2

c)

param3

d)

param4

6.

What is the shortcut for this line of code?

x = x + 1;

a)

x += 2;

b)

x -= 2;

c)

x ++;

d)

x --;

7.

What is the shortcut for this line of code?

x = x - 2;

a)

x += 2;

b)

x -= 2;

c)

x ++;

d)

x --;

8.

Which parameter controls the y-position?


ellipse ( param1, param2, param3, param4 );

a)

param1

b)

param2

c)

param3

d)

param4

9.

What is the shortcut for this line of code?

x = x - 1;

a)

x += 2;

b)

x -= 2;

c)

x ++;

d)

x --;

10.

Which is an example of declaring a variable?

a)

var sunSize = 10;

b)

sunSize = 10;

c)

sunSize;

d)

sunSize += 10;

11.

Which is an example of incrementing a variable?

a)

var sunSize = 10;

b)

sunSize = 10;

c)

sunSize += 10;

12.

Which is the shortcut version of

toothSize = toothSize + 8;

a)

toothSize += 8;

b)

toothSize + 8;

c)

toothSize = 8;

d)

toothSize ++ 8;

13.

Which is the shortcut version of

toothSize = toothSize - 3;

a)

toothSize -= 3;

b)

toothSize - 3;

c)

toothSize = 3;

d)

toothSize -- 3;

14.

How many time do we need to declare each variable?

example

var xPosition;

a)

Once

b)

Every time we use the variable

15.

What code is equivalent to

boatXPos += 1

a)

boatXPos ++;

b)

boatXPos --;

c)

boatXPos +;

d)

boatXPos -;

16.

What code is equivalent to

boatXPos -= 1

a)

boatXPos ++;

b)

boatXPos --;

c)

boatXPos +;

d)

boatXPos -;

17.

What is an example of camel case?

a)

eyeSize

b)

EyeSize

c)

eye_size

d)

eyesize

18.

Which line of code contains the VARIABLE DECLARATION?

a)

Line 8

b)

Line 21

c)

Line 27

19.

Which line of code contains the VARIABLE VALUE BEING UPDATED?

a)

Line 8

b)

Line 21

c)

Line 27

20.

Which is an example of declaring a variable?

a)

var sunSize;

b)

sunSize = 10;

c)

sunSize;

d)

sunSize += 10;

21.

Which line contains an error?

a)

Line 5

b)

Line 6

c)

Line 7

d)

No Error

22.

Which line contains an error?

a)

Line 5

b)

Line 6

c)

Line 7

d)

No Error

23.

Which line contains an error?

a)

Line 5

b)

Line 6

c)

Line 7

d)

No Error

24.

Which line contains an error?

a)

Line 5

b)

Line 6

c)

Line 7

d)

No Error

25.

Which line contains an error?

a)

Line 5

b)

Line 6

c)

Line 7

d)

No Error

26.

Which line contains an error?

a)

Line 5

b)

Line 6

c)

Line 7

d)

No Error

27.

Which line contains an error?

a)

Line 5

b)

Line 6

c)

Line 7

d)

No Error

28.

True or False: cheese will be displayed on the canvas with a font size of 28.

a)

True

b)

False

29.

True or False: cheese will be displayed on the canvas with a font size of 28.

a)

True

b)

False

30.

True or False: Text size should be set before each text command.

a)

True

b)

False

31.

Which is the proper syntax?

a)

textSize(10);

b)

textsize(10);

c)

TextSize(10);

d)

Textsize(10);

32.

Which parameter controls the y-position?

rect( param1, param2, param3, param4 );

a)

param1

b)

param2

c)

param3

d)

param4

33.

Which parameter controls the x-position?

rect( param1, param2, param3, param4 );

a)

param1

b)

param2

c)

param3

d)

param4

34.

Which parameter controls the intensity of red?

fill(param1, param2, param3);

a)

param1

b)

param2

c)

param3

35.

Which parameter controls the intensity of green?

fill(param1, param2, param3);

a)

param1

b)

param2

c)

param3

36.

Which parameter controls the intensity of blue?

fill(param1, param2, param3);

a)

param1

b)

param2

c)

param3

37.

Which parameter controls the intensity of red?

background(param1, param2, param3);

a)

param1

b)

param2

c)

param3

38.

Which parameter controls the intensity of green?

background(param1, param2, param3);

a)

param1

b)

param2

c)

param3

39.

Which parameter controls the intensity of blue?

background(param1, param2, param3);

a)

param1

b)

param2

c)

param3

40.

Which function runs only once?

a)

The Setup Function

b)

The Draw Function

41.

Which function runs repeatedly?

a)

The Setup Function

b)

The Draw Function

42.

Which of these is a Custom Function?

a)

Setup

b)

Draw

c)

drawBoat