Skip to content

Commit e5d2334

Browse files
committed
fix: formatting and clarify error message in variable declaration section
1 parent 39c6696 commit e5d2334

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2235,19 +2235,16 @@
22352235
| These variables do not exist in a program and are not declared | These variables declared in the program but have not assigned any value |
22362236
| If you try to read the value of an undeclared variable, then a runtime error is encountered | If you try to read the value of an undefined variable, an undefined value is returned. |
22372237
2238-
```javascript
2239-
2238+
```javascript
22402239
var a;
22412240
a; // yields undefined
22422241

2243-
b; // Throws runtime error like „Uncaught ReferenceError: b is not defined“
2244-
2242+
b; // Throws runtime error like "Uncaught ReferenceError: b is not defined"
22452243
```
2246-
This can be confusing, because it says not defined instead of not declared (Chrome)
2244+
This can be confusing, because it says `not defined` instead of `not declared` (Chrome)
22472245
22482246
**[⬆ Back to Top](#table-of-contents)**
22492247
2250-
```
22512248
22522249
82. ### What are global variables
22532250

0 commit comments

Comments
 (0)