NEW
Font size
Worksheets10.QZ JS Review
Total questions: 42
Worksheet time: 21mins
What is the shortcut for this line of code?
sunSize = sunSize + 10;
sunSize += 10;
sunSize -= 10;
sunSize ++ 10;
sunSize -- 10;
What is the shortcut for this line of code?
x += 1;
x = x +1;
x = x - 1;
x ++;
x --;
What is the shortcut for this line of code?
leftX = leftX - 10;
leftX -= 10;
leftX += 10;
leftX -- 10;
leftX ++ 10;
What is the shortcut for this line of code?
x = x + 2;
x += 2;
x -= 2;
x ++;
x --;
Which parameter controls the x-position?
ellipse ( param1, param2, param3, param4 );
param1
param2
param3
param4
What is the shortcut for this line of code?
x = x + 1;
x += 2;
x -= 2;
x ++;
x --;
What is the shortcut for this line of code?
x = x - 2;
x += 2;
x -= 2;
x ++;
x --;
Which parameter controls the y-position?
ellipse ( param1, param2, param3, param4 );
param1
param2
param3
param4
What is the shortcut for this line of code?
x = x - 1;
x += 2;
x -= 2;
x ++;
x --;
Which is an example of declaring a variable?
var sunSize = 10;
sunSize = 10;
sunSize;
sunSize += 10;
Which is an example of incrementing a variable?
var sunSize = 10;
sunSize = 10;
sunSize += 10;
Which is the shortcut version of
toothSize = toothSize + 8;
toothSize += 8;
toothSize + 8;
toothSize = 8;
toothSize ++ 8;
Which is the shortcut version of
toothSize = toothSize - 3;
toothSize -= 3;
toothSize - 3;
toothSize = 3;
toothSize -- 3;
How many time do we need to declare each variable?
example
var xPosition;
Once
Every time we use the variable
What code is equivalent to
boatXPos += 1
boatXPos ++;
boatXPos --;
boatXPos +;
boatXPos -;
What code is equivalent to
boatXPos -= 1
boatXPos ++;
boatXPos --;
boatXPos +;
boatXPos -;
What is an example of camel case?
eyeSize
EyeSize
eye_size
eyesize
Which line of code contains the VARIABLE DECLARATION?
Line 8
Line 21
Line 27
Which line of code contains the VARIABLE VALUE BEING UPDATED?
Line 8
Line 21
Line 27
Which is an example of declaring a variable?
var sunSize;
sunSize = 10;
sunSize;
sunSize += 10;
Which line contains an error?
Line 5
Line 6
Line 7
No Error
Which line contains an error?
Line 5
Line 6
Line 7
No Error
Which line contains an error?
Line 5
Line 6
Line 7
No Error
Which line contains an error?
Line 5
Line 6
Line 7
No Error
Which line contains an error?
Line 5
Line 6
Line 7
No Error
Which line contains an error?
Line 5
Line 6
Line 7
No Error
Which line contains an error?
Line 5
Line 6
Line 7
No Error
True or False: cheese will be displayed on the canvas with a font size of 28.
True
False
True or False: cheese will be displayed on the canvas with a font size of 28.
True
False
True or False: Text size should be set before each text command.
True
False
Which is the proper syntax?
textSize(10);
textsize(10);
TextSize(10);
Textsize(10);
Which parameter controls the y-position?
rect( param1, param2, param3, param4 );
param1
param2
param3
param4
Which parameter controls the x-position?
rect( param1, param2, param3, param4 );
param1
param2
param3
param4
Which parameter controls the intensity of red?
fill(param1, param2, param3);
param1
param2
param3
Which parameter controls the intensity of green?
fill(param1, param2, param3);
param1
param2
param3
Which parameter controls the intensity of blue?
fill(param1, param2, param3);
param1
param2
param3
Which parameter controls the intensity of red?
background(param1, param2, param3);
param1
param2
param3
Which parameter controls the intensity of green?
background(param1, param2, param3);
param1
param2
param3
Which parameter controls the intensity of blue?
background(param1, param2, param3);
param1
param2
param3
Which function runs only once?
The Setup Function
The Draw Function
Which function runs repeatedly?
The Setup Function
The Draw Function
Which of these is a Custom Function?
Setup
Draw
drawBoat
