
[Hall] Unit 8 JS Variables & Animation
Authored by Jocelyn Hall
Computers
9th - 12th Grade
Used 4+ times
![[Hall] Unit 8 JS Variables & Animation](https://cf.quizizz.com/img/studentpreview.webp)
AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is an example of declaring a variable?
var sunSize = 10;
sunSize = 10;
sunSize;
sunSize += 10;
Answer explanation
In JavaScript we use
var
to declare a variable.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Where is our PDE file do we declare a varaible?
outside of the draw function
inside of the draw function
Answer explanation
For now, all variables we use in the PDE file should be declared OUTSIDE of the draw function.
Sample Syntax~~
setup function
DECLARE VARIABLES
draw function
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is an example of incrementing a variable?
var sunSize = 10;
sunSize = 10;
sunSize += 10;
Answer explanation
To increment a variable means to increase it by the same amount at each change.
For example, your code may increment a scoring variable by +2 each time a goal is made.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is the shortcut version of
toothSize = toothSize + 8;
toothSize += 8;
toothSize + 8;
toothSize = 8;
toothSize ++ 8;
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is the shortcut version of
toothSize = toothSize - 3;
toothSize -= 3;
toothSize - 3;
toothSize = 3;
toothSize -- 3;
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Where is our PDE file do we increment a variable?
outside of the draw function
inside of the draw function
Answer explanation
For now, all variables we increment in the PDE file should be declared INSIDE of the draw function.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many time do we need to declare each variable?
example
var xPosition;
Once
Every time we use the variable
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
12 questions
Summative test 3 4th quarter Crimp
Quiz
•
10th Grade
18 questions
EXA-DIAG-INF-III-AGO-2022
Quiz
•
11th Grade
13 questions
Melody Tone
Quiz
•
9th Grade
13 questions
வகுப்பு 12 - அடோப் இன்டிசைன் CC 2019
Quiz
•
12th Grade
10 questions
python quiz
Quiz
•
6th Grade - Professio...
12 questions
Microsoft Office Word
Quiz
•
4th Grade - University
10 questions
Soal Ujian Komputer
Quiz
•
10th - 12th Grade
15 questions
Excel
Quiz
•
10th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
14 questions
[AP CSP] JavaScript Programming Quiz
Quiz
•
9th - 12th Grade
10 questions
Understanding Computers and Computer Engineering
Interactive video
•
7th - 12th Grade
37 questions
Python - Tuples, Lists, and List Methods
Quiz
•
9th - 12th Grade
60 questions
MOS Word Home, Insert, Reference Ribbon Basics
Quiz
•
9th Grade