UrbanPro

Learn Web Development from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

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

Asked by Last Modified  

Follow 1
Answer

Please enter your answer

In javascript, only functions create local scope. It is possible you may accidently declare variables with same name as being used on other libraries or your own code cause errnaneous results in your code or third party code. To avoid such global scope pollution, it is recommended to enclose your code...
read more

In javascript, only functions create local scope. It is possible you may accidently declare variables with same name as being used on other libraries or your own code cause errnaneous results in your code or third party code. To avoid such global scope pollution, it is recommended to enclose your code in IIF (Immediatly invoked functions) or also called Self Invoking Functions, you can avoid global scope issues.

read less
Comments

Related Questions

I want to be a web/ios/android developer though I have studied till class10. So can I do the course to work as a freelancer? M y main query is I have heard about many things which we get to study when we do B.Sc but I am not up to that level so can I do the course?
Hi Ashutosh , I like your confidence and would like to say definitively you can do the course , as you are upto 10 th class so it may be very difficult to get jobs in companies but if you will have good...
Ashutosh
Is it better to be a Web Designer or Web Developer?
However, there is a lot of variation based on experience and types of sites worked. Experienced designers working on large enterprise websites may make considerably more. Developers tend to make more money...
Asif
0 0
5
What would be the fee for this course?
Hi, we are starting fresh batches of web development from 5 August, the course duration is 3 months and charges are 10000, you can contact us for the same, we are Indian's First Virtual Reality Gameing...
Priyam
Want to do internship and learn web development (JS+PHP). With exposure to lve projects. Free internship
you can join my training institute , which is provide to corporate level expert training with placement guarantee in php course.
Rahul
What are the technologies that every Full Stack JavaScript developer should know?
Full Stack consists of 3 categories. 1. Front End Technologies like HTML5, CSS 3, JavaScript (Angular JS / React JS / jQuery / Vue / Plain Java Script) etc.. 2. Middleware Technologies like Node JS, Java...
Nandhini
0 0
7

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Why Should We Learn React
Nowadays, if we are talking about web development, then many web languages are available, but there are two things only: Front-end and back-end. For front-end, the browser only knows HTML, CSS and javascript....

Embedding and including
Let's first see a simple example: This is a JavaScript example Usually, JavaScript code starts with the tag . The code placed between and . Sometimes, people embed the code in the tags: Why do we...

Necessity of Theory and Practical in Computer Science.
Upon studying a subject both theory and practical are important. Usually many schools concentrate more on theory and the marks not on the practical. Other and opposite kind of people prefer practical...

Introduction to Programming Languages
What is a Programming Language? A programming language is a formal computer language or constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages...

Points To Keep In Mind While Designing & Developing A Website
What is Web designing? The term Web designing circumscribes around production and maintanance of a website. It covers different areas such as Interface design or often called as User Interface, the code...

Recommended Articles

Today, no business can exist without having its own website to interact with its customer base. Having a website is no more restricted to the big MNCs. With the advancement in technology and global business, even the small enterprises are spending on having their own websites and development teams. The person works on web...

Read full article >

Information technology consultancy or Information technology consulting is a specialized field in which one can set their focus on providing advisory services to business firms on finding ways to use innovations in information technology to further their business and meet the objectives of the business. Not only does...

Read full article >

Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system’s storage capacity and you can’t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...

Read full article >

Microsoft Excel is an electronic spreadsheet tool which is commonly used for financial and statistical data processing. It has been developed by Microsoft and forms a major component of the widely used Microsoft Office. From individual users to the top IT companies, Excel is used worldwide. Excel is one of the most important...

Read full article >

Looking for Web Development Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Web Development Classes?

The best tutors for Web Development Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Web Development with the Best Tutors

The best Tutors for Web Development Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more