Choose all of the blocks that create a new variable in Game Lab.
Game Lab - Variables

Quiz
•
Computers
•
7th - 12th Grade
•
Hard
Tim Helland
Used 27+ times
FREE Resource
6 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Answer explanation
To create a variable, the JavaScript keyword var should be present. Otherwise, you are attempting to use an existing variable.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Every block in Game Lab represents a piece of Javascript code.
True
False
Answer explanation
When you use blocks in Game Lab, you are really dragging around pieces of Javascript code.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the final value of x when this program runs?
3
4
0
Nothing. An error will occur.
Answer explanation
This is valid code. x will have the same value as y because of the last code block.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What should be changed about this code?
Nothing. It is the best way to write this code.
The blocks should be reordered.
The variable names don't match.
You must always set a variable to equal a number.
Answer explanation
The blocks should be reordered so that x is defined before it is used in other blocks.
A variable should be declared with the var keyword before it is used elsewhere.
Note: Due to how Javascript works, this code will run either way. But, it is best practice to reorder these blocks.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement is most accurate about this code?
The program will not run.
The ellipse is very wide.
The ellipse is at the right.
The ellipse is at the left
The ellipse is very tall.
Answer explanation
The correct code should have been to put width in the 3rd spot.
But, it will still work as is. The "x" value of the ellipse will be 400. This moves it to the far right.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is wrong with this code?
x has been declared more than once using var.
Values should not exceed 100.
Nothing. It is perfectly fine as is.
Answer explanation
The correct code should look like this.
You should only declare the same variable one time using the var keyword.
Note: This won't show an error in Game Lab, but it isn't correct.
Similar Resources on Quizizz
11 questions
Learning Variables

Quiz
•
9th - 12th Grade
9 questions
Block Coding

Quiz
•
3rd - 9th Grade
10 questions
Python - Printing, Variables and Syntax

Quiz
•
8th Grade
10 questions
Python Basics

Quiz
•
8th - 10th Grade
11 questions
Scratch Quiz ADVANCED

Quiz
•
5th - 8th Grade
10 questions
Small basic

Quiz
•
6th - 7th Grade
8 questions
Java Script

Quiz
•
5th - 7th Grade
10 questions
Code.org Unit 5 Vocab Quiz 1

Quiz
•
9th - 12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
11 questions
Decimal/fraction conversions quick check

Quiz
•
5th - 7th Grade