Lexical scoping of the const
is not invalidated when use await
in REPL
#45918
Labels
doc
Issues and PRs related to the documentations.
Affected URL(s)
https://github.com/nodejs/node/blob/main/doc/api/repl.md#await-keyword
Description of the problem
In document, described as below.
One known limitation of using the await keyword in the REPL is that it will invalidate the lexical scoping of the const and let keywords.
For example:
But actual result is different like below.
(1) const
(2) let
I guess limitation is fixed. So how about removing these lines(
One known blabla
, including example) from document?The text was updated successfully, but these errors were encountered: