doc: update example of using `await` in REPL · nodejs/node@576a6df · GitHub
Skip to content

Commit 576a6df

Browse files
dario-piotrowiczaduh95
authored andcommitted
doc: update example of using await in REPL
Clarify that the lexical scope of `const` is invalidated when using top-level `await` in REPL. As part of this change also add tests for the documented behavior Fixes: #45918 Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> Co-authored-by: Dario Piotrowicz <dario.piotrowicz@gmail.com> PR-URL: #57653 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 56380df commit 576a6df

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

doc/api/repl.md

Lines changed: 5 additions & 5 deletions

test/parallel/test-repl-top-level-await.js

Lines changed: 6 additions & 0 deletions

0 commit comments

Comments
 (0)