1. Home
  2. Computing & Technology
  3. JavaScript

Learn Modern Unobtrusive JavaScript
Other Objects

By , About.com Guide

There are a number of other objects that JavaScript has predefined that we haven't covered in the prior tutorials in this series. While you will not need to use any of these other objects as often as the ones that we have already discussed, a discussion of the objects built into JavaScript would not be complete without at least mentioning them.

The Boolean object provides you with a way to define your own objects where only two values are allowed - true and false. The thing to watch out for when processing Boolean objects is to make sure that you are testing the valueOf() the object and not just the object itself (which like all objects returns true if the object exists).

The Function object provides a third but less commonly used way of defining a function. Knowing that functions are really objects will also help you to understand some of the differences between how JavaScript treats functions compared to how some other languages you may know treat them.

There are a whole group of objects that exist to take care of error handling.

  • Error
  • EvalError
  • RangeError
  • ReferenceError
  • SyntaxError
  • TypeError
  • URIError

Last but definitely not least because it is the object that you are more likely to use than any other object except for numbers, strings, and arrays is the RegExp object. RegExp stands for regular expression. What that basically means is pattern matching which means that you can both test for if a text string contains text that matches a given pattern and also to be able to replace the matched text with different text. The various methods and properties of the RegExp object is already fully covered in a separate tutorial series and so I suggest you read the RegExp tutorials to find out more about that object.

More of This Tutorial

Explore JavaScript
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. JavaScript
  4. Javascript Tutorials
  5. Learn Modern JavaScript
  6. Unobtrusive JavaScript - Other Objects>

©2009 About.com, a part of The New York Times Company.

All rights reserved.