
Variables Review
Presentation
•
Computers
•
7th Grade
•
Practice Problem
•
Medium
Brandi Girtman
Used 9+ times
FREE Resource
9 Slides • 8 Questions
1
JavaScript Review: Variables
2
What is a variable?
A container for storing a value in the computer's memory
Once created, it can be updated repeatedly throughout the program
3
Use the JavaScript keyword var followed by a label and the semi-colon.
How do you create a variable?
💡TIP: The label should describe the variable that you want to store.
4
Use the label, an equal sign, and the value followed by the semi-colon.
How do you assign a value to a variable?
💡TIP: You don't need the var keyword when assigning the value.
The equal sign is called the "assignment operator"
5
Variable Naming Rules
Labels CAN NOT have spaces
Labels CAN NOT start with a number
Capitalization & spelling MUST match
6
Multiple Choice
A variable is used to:
Store a value in memory
Draw a circle
Store a value that does not change
Draw a rectangle
7
Multiple Choice
Which of these is NOT a good name for a variable storing your middle name?
myMiddleName
middleName
x
midNam
8
Multiple Select
What can be stored in a variable?
(choose 4)
background
color
text
number
a sprite
9
Multiple Choice
JavaScript uses the _______ keyword to define variables.
var
variable
vrb
vari
10
When you create a variable AND assign it a value in one line of code.
Initializing a variable
When assigning values, the equal sign
Is not the same as math class
In JavaScript, it sets the value
11
12
Sometimes, you can't see the value of your variable in the program.
One Problem with variables...
Use console.log(label) to show the value of the variable in the console log.
13
Multiple Choice
How would a computer programmer read the following line of code?
var xPosition = 500;
The variable xPosition is equal to 500.
The variable xPosition gets the value of 500.
14
Multiple Choice
How do you use a variable that has been initialized (created & given a value) in your program?
By using a function
By typing its name
By opening a file
15
Fill in the Blanks
Type answer...
16
Multiple Choice
Which line of code is written correctly?
var 2position = 25;
var yPosition = 12
var xPosition = 25;
var shoe size = 10;
17
JavaScript Review: Variables
Show answer
Auto Play
Slide 1 / 17
SLIDE
Similar Resources on Wayground
11 questions
Engineering Design Process
Presentation
•
7th Grade
13 questions
Verb to be
Presentation
•
7th Grade
16 questions
Images & Binary
Presentation
•
7th Grade
12 questions
Simple Probability
Presentation
•
7th Grade
12 questions
Inequalities
Presentation
•
7th Grade
12 questions
diffusion
Presentation
•
7th Grade
11 questions
Computer Monitor
Presentation
•
7th Grade
13 questions
Verbs - Tenses and Phrases
Presentation
•
7th Grade
Popular Resources on Wayground
20 questions
Math Review
Quiz
•
3rd Grade
15 questions
Fast food
Quiz
•
7th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
10 questions
Identify Fractions, Mixed Numbers & Improper Fractions
Quiz
•
3rd - 4th Grade
Discover more resources for Computers
15 questions
Fast food
Quiz
•
7th Grade
10 questions
Candy
Quiz
•
4th - 8th Grade
10 questions
Fact Check Ice Breaker: Two truths and a lie
Quiz
•
5th - 12th Grade
10 questions
Memorial Day History and Traditions
Interactive video
•
5th - 8th Grade
14 questions
Volume of rectangular prisms
Quiz
•
7th Grade
15 questions
Middle School Fun Trivia Questions
Quiz
•
7th - 8th Grade
22 questions
Simple Probability
Quiz
•
7th Grade
10 questions
Video Games
Quiz
•
6th - 12th Grade