[Hall] Unit 8 JS Variables & Animation

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Jocelyn Hall
Used 4+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Blender Homework 2

Quiz
•
9th Grade
10 questions
Bitmap v Vector Images

Quiz
•
KG - University
15 questions
Introduction to MS Word

Quiz
•
1st - 10th Grade
12 questions
AI Project Activity

Quiz
•
10th Grade
15 questions
Chapter : 9 Working with tables

Quiz
•
5th Grade - University
16 questions
BTEC IT - File types & compression

Quiz
•
10th - 12th Grade
15 questions
Introduction to CSS

Quiz
•
11th - 12th Grade
16 questions
8525 AQA GCSE Computer Science 3.7.1 Relational databases

Quiz
•
7th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade