What is the correct way to declare a constant variable in JavaScript?

FEW-Js1

Quiz
•
Design
•
University
•
Hard

Gakwaya Nkundimana Joel
Used 2+ times
FREE Resource
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
constant PI=3.14;
let PI=3.14;
const pi=3.14
none above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will happen if you try to reassign a value to a variable declared with const?
it will change the value
it will throw an error
it will create a new variable
nothing will happen
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what is the answer for this "let num; console.log(num);
null
0
undefined
error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which one of these variable names is NOT valid in JavaScript?
myVar
$price
1st_name
_myname
5.
FILL IN THE BLANK QUESTION
45 sec • 1 pt
let, var, and const are used to ______ variables in JavaScript.
6.
FILL IN THE BLANK QUESTION
45 sec • 1 pt
Variables created with const must be ______ during create.
7.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
What will be the output?
const num;
num = 5;
console.log(num);
5
undefined
syntax error
num
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Activity 1.1.1 - Introduction to Creating Objects in Onshape

Quiz
•
10th Grade - University
10 questions
Design Thinking

Quiz
•
University
10 questions
Diseño de Sistemas de Medición

Quiz
•
University
10 questions
Assembly DRawing Quiz

Quiz
•
University
15 questions
SMED and POKA YOKE

Quiz
•
University
10 questions
BMC

Quiz
•
University - Professi...
11 questions
Video Games

Quiz
•
5th Grade - Professio...
12 questions
C Basics

Quiz
•
University
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade