()
| 273 | var global3 = 3; |
| 274 | |
| 275 | function myFunc4() { |
| 276 | // we can access these values from the function's scope |
| 277 | console.log(global1); |
| 278 | console.log(global2); |
| 279 | console.log(global3); |
| 280 | |
| 281 | // * variable declared globally if no keyword is used |
| 282 | global4 = 4; |
| 283 | } |
| 284 | |
| 285 | myFunc4(); |
| 286 | // * we can access the global4 variable even tho we are going from a outward scope inwards |