Wrapping content of a JavaScript source file

Tags:
JavaScript
What is the significance of, and reason for, wrapping the entire content of a JavaScript source file in a function block?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Subhendu Sen
    Assuming this is not a business case and based on home work/ course related, it is better to read your study materials minutely and solve this query by your own effort.
    140,720 pointsBadges:
    report
  • TheRealRaven
    We have no way to answer without seeing the code and knowing how will be used. In general, it'd be so that the code can be executed with a function invocation. But that's merely a statement of why functions are created. It doesn't go to the purpose at all.
    36,025 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: