In JavaScript,
we can define a function
inside another function.
The inner function can access
the variables defined in
the outer function.
However, the outer function
does not have access
to the variables defined
in the inner function.
In the example given above,
In the example above,
we can access innerNum only from
inside the innerFunc function.
If we try to access it from outerFunc,
we will get an error.