I started learning javascript recently and I got confused in a spot.
Why do some functions get called inside another function.
Example:
Function