Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
doc: remove limitation of using await in REPL
Invalidating the lexical scoping of the `const` and
`let` keywords is fixed.

Fixes: #45918
  • Loading branch information
deokjinkim committed Dec 21, 2022
commit 0f4446c0bb1b701aa8036ce49a8f3a6e84e5e293
17 changes: 0 additions & 17 deletions doc/api/repl.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,23 +234,6 @@ 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
```

[`--no-experimental-repl-await`][] shall disable top-level await in REPL.

### Reverse-i-search
Expand Down