minor fixes

This commit is contained in:
Ilya Kantor 2021-05-24 11:21:44 +03:00
parent 94837c2e69
commit 3e74537ea4

View file

@ -114,9 +114,9 @@ Here are two scripts on the same page, both `type="module"`. They don't see each
``` ```
```smart ```smart
In the case of a web browser, we can make a window-level global variable by explicitly assigning it to `window`, e.g. `window.user = "John"`. In the browser, we can make a variable window-level global by explicitly assigning it to a `window` property, e.g. `window.user = "John"`.
Then all scripts will see it. Then all scripts will see it, both with `type="module"` and without it.
That said, making such global variables is frowned upon. Please try to avoid them. That said, making such global variables is frowned upon. Please try to avoid them.
``` ```