Which keyword is used to declare a variable in JavaScript?

JavaScript Variables Quiz

Quiz
•
Other
•
12th Grade
•
Hard
Andrea Cascia
Used 5+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
var
let
const
all of the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to assign a value to a variable in JavaScript?
x = 5;
5 = x;
x == 5;
x := 5;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid variable name in JavaScript?
myVariable
123Variable
$variable
var
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the scope of a variable declared with the 'var' keyword?
Global scope
Local scope
Block scope
Function scope
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the scope of a variable declared with the 'let' keyword?
Global scope
Local scope
Block scope
Function scope
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the scope of a variable declared with the 'const' keyword?
Global scope
Local scope
Block scope
Function scope
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid variable naming convention in JavaScript?
camelCase
snake_case
PascalCase
all of the above
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
Examen de JavaScript

Quiz
•
12th Grade
10 questions
G21 10 ZAMORA

Quiz
•
9th - 12th Grade
20 questions
Basic Geometric Figures

Quiz
•
9th - 12th Grade
20 questions
Java Primitive Practice

Quiz
•
12th Grade
15 questions
JS 1

Quiz
•
12th Grade
10 questions
TLE quiz module 1-5

Quiz
•
9th - 12th Grade
10 questions
JavaScript 1

Quiz
•
9th - 12th Grade
10 questions
Javascript Básico

Quiz
•
9th - 12th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
15 questions
June Review Quiz

Quiz
•
Professional Development
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade
Discover more resources for Other
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade
65 questions
MegaQuiz v2 2025

Quiz
•
9th - 12th Grade
10 questions
GPA Lesson

Lesson
•
9th - 12th Grade
15 questions
SMART Goals

Quiz
•
8th - 12th Grade
45 questions
Week 3.5 Review: Set 1

Quiz
•
9th - 12th Grade