A page in the
Statements · Control Flow Statements · Comments · Objects · Functions · Style
Scoping · Inheritance · DOM

It has been suggested that this page or section be merged into Wikibooks:JavaScript. (Discuss)

Functions may be defined ("nested") inside other functions, thereby freeing up some global identifiers and keeping your data safe from that of other scripts.

If a function is defined in the global namespace, i.e. outside of all other functions, it is a method of the global object, window, and may be called as .

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.