volume_mute
Way of assigning values JavaScript variables
publish date: 2022/09/05 01:24:00 GMT+10
volume_muteIt is possible in JavaScript to write two consecutive assignment statements like that
list = [10.2, 3.5];
list = 47;
Correct Answer
True
Explanation
A JavaScript script may contain the following statement:
list = [10.2, 3.5];
Regardless of the previous type of the variable named list
, this assignment causes it to become the name of a single-dimensioned array of length 2. If the statement
list = 47;
followed the previous example assignment, list would become the name of a scalar variable.
Reference
Concepts of Programming languages, 10th ed