Javascript Function Scope
<p>This is perhaps a dumb question, but I am new to Javascript and desperate for help.</p>

<p>If the Javascript engine will look for global variables outside of a function, then what is the point of passing parameters to it? What do you gain?</p>

<p>I understand that global variables are generally frowned upon, but I still don't understand the purpose of passing variables. Does it have something to do with data encapsulation?</p>
