| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a0c566f commit 620ee42
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -233,6 +233,23 @@ undefined | |||
| 233 | 233 | undefined | |
| 234 | 234 | ``` | |
| 235 | 235 | ||
| 236 | + One known limitation of using the `await` keyword in the REPL is that | ||
| 237 | + it will invalidate the lexical scoping of the `const` and `let` | ||
| 238 | + keywords. | ||
| 239 | + | ||
| 240 | + For example: | ||
| 241 | + | ||
| 242 | + ```console | ||
| 243 | + > const m = await Promise.resolve(123) | ||
| 244 | + undefined | ||
| 245 | + > m | ||
| 246 | + 123 | ||
| 247 | + > const m = await Promise.resolve(234) | ||
| 248 | + undefined | ||
| 249 | + > m | ||
| 250 | + 234 | ||
| 251 | + ``` | ||
| 252 | + | ||
| 236 | 253 | ### Reverse-i-search | |
| 237 | 254 | <!-- YAML | |
| 238 | 255 | added: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments