NEW
Font size
WorksheetsJavaScript Final Exam Study Guide
Total questions: 28
Worksheet time: 28mins
What is missing in this code block?
x
y
width
height
What is the width of the rectangle?
30
50
100
150
What will most likely be displayed by this code?
pig
rectangle
bear
circle
Will this code draw an ellipse that is fully visible on the screen?
Always
Sometimes
Never
What color is the ellipse?
Red and gray
Black and gray
Red and blue
Black and blue
What text will be displayed by this code?
words
hello
0
15
Nothing
What will be displayed by this code?
Nothing
A white background
A yellow background
Blue text on a white background
Blue text on a yellow background
What does this tool do?
Flip
Rotate
Cut
Paste
What does this tool do?
Draw a rectangle
Select items
Change border style
Crop the image
What is the purpose of this code tile?
Prevent medical emergency.
Stop drawing of text.
Stop drawing of outlines.
Stop all drawing.
Which of these is the correct way to use a draw loop?
Which direction will the sprite move on the screen?
Left
Right
Up
Down
None
Which direction will the sprite move?
Up
Down
Left
Right
None
What color will be displayed?
Red
Green
Blue
Yellow
Which tiles or blocks can be used to get the current position of the mouse cursor?
What will be displayed by this code?
Nothing
A tree
A tree and a rectangle
A rectangle
What is wrong with this code block?
It should say YELLOW in caps.
It should say "yellow" in quotes.
There is no fill code block in Game Lab.
Yellow is not a color recognized by name.
Which of these is a reasonable value to use in this code block?
1
15
150
1500
0.1
This tile represents...
Greater than
Less than
Insert into
A pointy nose
What is the possible range of values for x?
100 to 200
100 to 250
150 to 250
150 to 200
A team of friends is creating a game together. They want to make sure that everyone can understand the code that the others write. Which of the following will make it easier for them to read each other's code?
Use the counter pattern to increase the score.
Include descriptive comments in the program.
Use watchers to keep track of variable and sprite property values.
Give variables and functions names that begin with numbers.
Which of the following is a true statement about functions in JavaScript?
They create and organize sprites and sprite attributes.
They do not need to be debugged because code within them can be in any order.
They are not a necessary part of the code in order for a program to run.
They let you use the same code in different places in the program without having to rewrite it.
What is the banana's x position at the end of this program?
20
60
90
80
A programmer identifies a problem that exists in their code, but is unable to locate it. What can the programmer do to help them find and fix the error?
Use the debug console to track outputs.
Use a loop to see how many iterations of the problem exists.
Leave the code as it is and hope the error will fix itself.
Delete everything and start over.
A team is making a platform jumper game. The background and platforms are working, but the main character won't appear. Which of the following might be the problem?
1. They forgot to call drawSprites in the draw loop.
2. The character sprite is drawn behind the background sprite.
3. The character sprite is drawn off the screen.
3 only
1 and 2
2 and 3
1, 2, and 3
What color will the background be when the code is run?
Blue
Yellow
Blue, then changes to red
Red, then changes to blue
The program creates a variable named counter. Which of the following is true about the code?
The counter pattern is within the draw function, so it will update repeatedly.
The counter variable is initialized in the draw function.
The background overlays the counter text, so you aren't able to see the counter.
The counter pattern adds 400 to the value of the variable each time it is called.
Which result will be printed in the console by this program?
true
false
true
0
200
100
true
error
true
false
true
false
