Function Execution in JavaScript
To see how are these functions executed in JavaScript let's take the reference of the following example.
1. var x = 1;
2. a();
3. b();
4.
5. console.log(x);
6.
7. function a() {
8. var x = 10;
9. console.log(x);
10.}
11.
12. function b() {
13. ...
moreshwar.hashnode.dev3 min read