diff --git a/doc/api/repl.md b/doc/api/repl.md index ab55411c356443..075fa91581c428 100644 --- a/doc/api/repl.md +++ b/doc/api/repl.md @@ -233,6 +233,23 @@ undefined undefined ``` +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: + +```console +> const m = await Promise.resolve(123) +undefined +> m +123 +> const m = await Promise.resolve(234) +undefined +> m +234 +``` + ### Reverse-i-search