Variables - var, let & const

Interactive Video
•
Information Technology (IT), Architecture
•
University
•
Hard
Wayground Content
FREE Resource
Read more
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword was introduced in ES6 for variable declaration?
float
int
let
var
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the initial value of a variable declared with var but not assigned?
empty string
null
0
undefined
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a common use case for initializing a variable without a value?
To use in a conditional statement
To declare a function
To create a constant
To start a loop
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which character is not allowed at the start of a JavaScript variable name?
Number
Underscore
Dollar sign
Letter
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the recommended naming convention for multi-word variables in JavaScript?
lowercase
snake_case
PascalCase
camelCase
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid variable name in JavaScript?
name!
$name
_name
1name
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How does let differ from var in terms of scope?
let is function-scoped
let is block-scoped
let is globally-scoped
let has no scope
Create a free account and access millions of resources
Similar Resources on Wayground
11 questions
Quick JavaScript Crash Course - Modern and Advanced JavaScript - Var Keyword

Interactive video
•
University
11 questions
Modern JavaScript from the Beginning - Second Edition - Variables and Constants

Interactive video
•
University
6 questions
HTML CSS and JavaScript for Beginners - A Web Design Course - ES6 JavaScript

Interactive video
•
University
6 questions
Learn JavaScript from Scratch JavaScript for Everyone - JavaScript Scope

Interactive video
•
University
5 questions
Variables - var, let & const

Interactive video
•
University
11 questions
The Complete React Developer Course (with Hooks and Redux) - ES6 Aside: const and let

Interactive video
•
University
11 questions
The Complete React Developer Course (with Hooks and Redux) - ES6 Aside: const and let

Interactive video
•
University
8 questions
Tips, Tricks, and Techniques for Node.js Development 2.1: Using const and arrow Functions

Interactive video
•
University
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
10 questions
Afterschool Activities & Sports

Quiz
•
6th - 8th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
15 questions
Cool Tool:Chromebook

Quiz
•
6th - 8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
20 questions
Bullying

Quiz
•
7th Grade
18 questions
7SS - 30a - Budgeting

Quiz
•
6th - 8th Grade
Discover more resources for Information Technology (IT)
36 questions
USCB Policies and Procedures

Quiz
•
University
4 questions
Benefits of Saving

Quiz
•
5th Grade - University
20 questions
Disney Trivia

Quiz
•
University
2 questions
Pronouncing Names Correctly

Quiz
•
University
15 questions
Parts of Speech

Quiz
•
1st Grade - University
1 questions
Savings Questionnaire

Quiz
•
6th Grade - Professio...
26 questions
Parent Functions

Quiz
•
9th Grade - University
18 questions
Parent Functions

Quiz
•
9th Grade - University