Learn some JavaScript definitions

If you're just beginning to take an interest in JavaScript, check out these JavaScript definitions.

By Emily A. Vander Veer

JavaScript is an object-oriented computer language, so it looks a little different than traditional procedural languages, such as C and Pascal. For starters, programmers describe data and procedures in terms of objects, methods, and properties—not variables, routines, and statements. JavaScript programming uses a number of specialized terms:

client: in terms of Web-based applications, a client is the computer running a Web browser. Web pages are loaded from Web servers to Web clients, where they're displayed.

event handler: a special attribute that associates an object with an event. For instance, you can associate a button with a mouse click by using the onClick event handler. You can find a list of event handlers at Netscape's JavaScript reference page.

function: a named set of JavaScript statements interpreted all at once by calling the function name. JavaScript has several built-in functions, but you can extend the list by writing your own.

instance: one particular incarnation of an object. For example, while president may be an object, Bill Clinton is an instance of president. Similarly, a Web page button is an object, but myCalculateButton is an instance.

method: an action that a particular object can perform. Methods are implemented just like functions, but they're always associated with a particular object. Think of methods as verbs. You'll find a list of methods at Netscape's JavaScript reference page.

object model: a group of objects that work together for a common purpose. The JavaScript object model comprises all the elements that make up a Web page.

object: any thing, idea, or concept is an object. Object-based languages like JavaScript make it easy to model and work with real-world objects, such as Web pages and Web-page elements. Objects are typically nouns. For example, window, document, and image are all JavaScript objects.

property: a one-word attribute that describes an object. For example, length, name, and target are all JavaScript properties. In JavaScript, an object's properties are defined by using the object's name, a period, and the property name. Furthermore, an object can contain other objects. For instance, a check box named pepperoni on a pizza order form might have its value referenced like this: document.orderform.pepperoni.value. Check out Netscape's JavaScript reference page for a list of available properties.

Emily A. Vander Veer is the author of numerous Internet-related magazine articles and books, including JavaScript for Dummies, JavaScript for Dummies Quick Reference, and JavaBeans for Dummies, all published by IDG Books.

Editor's Picks