Well done!
You have completed Basics of Variables in JavaScript: Usage and Illustrations Quiz!
Quiz Question 1 of 5
What is the main risk of omitting the let
, const
, or var
keyword when assigning a value to a variable in JavaScript?
Choose the correct answer below:
-
A
The variable will cause the JavaScript engine to throw a syntax error in non-strict mode.
-
B
The variable will automatically become a local variable within the current function scope.
-
C
The variable will be treated as a constant and cannot be modified later in the code.
-
D
The variable will be globally scoped, leading to potential conflicts with other variables.