0 votes
in JavaScript by
Why is it common to wrap the content of JavaScript source file in a function book?

1 Answer

0 votes
by

Many JavaScript libraries use this technique. It helps to develop a closure around the contents of the file which helps to create a private namespace and hence, avoid any name clash with different JavaScript modules and libraries. 

...