You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ node
Welcome to Node.js v12.16.1.
Type ".help" for more information.
> let m = Map();
Uncaught TypeError: Constructor Map requires 'new'
at Map (<anonymous>)
> m
Uncaught ReferenceError: m is not defined
> let m = new Map();
Uncaught SyntaxError: Identifier 'm' has already been declared
> m = new Map();
Uncaught ReferenceError: m is not defined
> delete m
false
> m = 2
Uncaught ReferenceError: m is not defined
How often does it reproduce? Is there a required condition?
100%
What is the expected behavior?
It appears that m is declared, but not defined. Why am I unable to initialize it at this point using m = 2 or m = new Map()?
The text was updated successfully, but these errors were encountered:
addaleax
added
duplicate
Issues and PRs that are duplicates of other issues or PRs.
repl
Issues and PRs related to the REPL subsystem.
labels
Mar 26, 2020
Thank you for the speedy response. I totally sympathize with you and the team when it comes to implementing the dark corners of the language spec and thanks for all your efforts.
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
100%
What is the expected behavior?
It appears that
m
is declared, but not defined. Why am I unable to initialize it at this point usingm = 2
orm = new Map()
?The text was updated successfully, but these errors were encountered: