NEW
Font size
S
M
L
XL
WorksheetsJavaScript
Total questions: 15
Worksheet time: 3mins
Name
Class
Date
1.
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)
2.
Which command colors the background of your canvas?
a)
background
b)
endShape
c)
var = color
d)
fill
3.
What command removes the outlines from shapes?
a)
noOutline ();
b)
noColor();
c)
noBorder();
d)
noStroke ();
4.
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);
5.
What command colors a shape?
a)
color (43, 255, 0);
b)
bucket (43, 255, 0);
c)
fill (43, 255, 0);
d)
bucket (43, 255, 0);
6.
What command draws a line?
a)
stroke (200, 220, 275, 220);
b)
line (200, 220, 275, 220);
c)
horizontal (200, 220, 60, 75);
d)
pencil (200, 220, 275, 220);
7.
What is at the end of a line of code?
a)
#
b)
;
c)
)
d)
>
8.
The "stroke" command means
a)
color inside shape
b)
color outside shape
c)
color of blocks
d)
border
9.
What does the "fill" command do
a)
put letters in the shape
b)
put pictures in the shape
c)
put color in the shape
d)
put code in the shape
10.
Any code that is within the following draw function:
draw = function(){
......
}
draw = function(){
......
}
a)
Will be performed twice
b)
Will not be performed
c)
Will be performed once
d)
Will be repeated over and over again
11.
The following code will:
x++;
x++;
a)
Add 1 to the previous value of x
b)
Add 1 to the previous value of y
c)
Subtract 1 from the previous value of x
d)
Give an error message
12.
A variable is used to:
a)
Store a value in memory
b)
Draw a circle
c)
Store a value that does not change
d)
Draw a rectangle
13.
In a programming language, __________ are used to store data values.
a)
tags
b)
codes
c)
files
d)
variables
14.
JavaScript uses the _______ keyword to define variables.
a)
vrb
b)
var
c)
vari
d)
va
15.
This saves a value, which can be then assigned when writing code
a)
Parameter
b)
Function
c)
Variable
Reset
