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
8 questions
JavaScript Mastery from Zero to Hero - Prepare for Coding Interviews - Global Versus Local Scope in Functions with JavaS

Interactive video
•
University
8 questions
Learn JavaScript from Scratch JavaScript for Everyone - Let and Const Variable Types

Interactive video
•
University
8 questions
Excel VBA Programming The Complete Guide - Constants

Interactive video
•
University
11 questions
The Modern JavaScript Bootcamp (2019) - Bonus: Variables with var

Interactive video
•
University
6 questions
Quick JavaScript Crash Course - Modern and Advanced JavaScript - Introduction-Variables And Scoping

Interactive video
•
University
8 questions
Block Scope With let & const

Interactive video
•
University
8 questions
Frontend Web Development Bootcamp - Build a Twitter Clone - Variables in JavaScript

Interactive video
•
University
8 questions
Modern Web Design with HTML5, CSS3, and JavaScript - JavaScript – Let and Const Variables

Interactive video
•
University
Popular Resources on Wayground
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
20 questions
Lab Safety and Equipment

Quiz
•
8th Grade
13 questions
25-26 Behavior Expectations Matrix

Quiz
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Information Technology (IT)
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
2 questions
Pronouncing Names Correctly

Quiz
•
University
12 questions
Civil War

Quiz
•
8th Grade - University
18 questions
Parent Functions

Quiz
•
9th Grade - University
21 questions
Mapa países hispanohablantes

Quiz
•
1st Grade - University
19 questions
Primary v. Secondary Sources

Quiz
•
6th Grade - University
25 questions
Identifying Parts of Speech

Quiz
•
8th Grade - University
20 questions
Disney Trivia

Quiz
•
University