What Is a JavaScript Void 0?


Quick Answer

In JavaScript, a Void 0 is a programming tool that is used to prevent a browser from loading a new page. It is used in connection with a JavaScript Alert.

Continue Reading
Related Videos

Full Answer

Web browsers will evaluate the uniform resource locator, or URL, in a line of code and attempt to load the page. A JavaScript void operator returns a value of null and so the browser does not load the new page. In this way, a scripter can force the keyword to be treated as an expression and not as a declaration in cases where the JavaScript statement is used as a URL that returns a value. Undefined can be used in place of void unless it has been otherwise assigned.

Learn more about Computer Programming

Related Questions