1. Home
  2. Computing & Technology
  3. JavaScript
Stephen Chapman
Stephen's JavaScript Blog

By Stephen Chapman, About.com Guide to JavaScript

Functions and Object Constructors

Thursday November 5, 2009
JavaScript doesn't have classes but objects can inherit directly from other objects

In JavaScript object constructors are defined the same way you define a function. What distinguishes one from the other is the way it is called. By testing how it was called inside your function you can make functions that are also object constructors or can test if it is called the right way.

Functions and Object Constructors
Comments

No comments yet. Leave a Comment

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

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

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

All rights reserved.