Creating objects with the JavaScript language

See the different methods used to create objects using JavaScript. This demo uses each object-creation method to create a functional photo slideshow.

Kris Hadlock (, Web Developer/Designer, Studio Sedition

Photo of Kris HadlockKris Hadlock has been a contract web developer and designer since 1996. He has worked on projects for companies such as SPIN Magazine, IKEA, United Airlines, JP Morgan Chase, GoDaddy Software, and Fire Mountain Gems. He is the author of Ajax for Web Application Developers (Sams) and The ActionScript Migration Guide (New Riders) as well as a featured columnist and writer for numerous websites and design magazines, including,, and Practical Web Design magazine. Kris is also the founder of, a web design and software development studio specializing in fusion of form and function.

01 November 2011

With the increased popularity of interactive websites, JavaScript is in high demand. Developers who truly want to write complex JavaScript code need to have a basic understanding of the different ways custom objects are built and how to use them. This demo shows a few different ways a custom object can be created using JavaScript and how the objects can be used in a real-world situation by creating an interactive photo gallery.


11 minutes





Get products and technologies

  • Try IBM software for free. Download a trial version, log into an online trial, work with a product in a sandbox environment, or access it through the cloud. Choose from over 100 IBM product trials.
Zone=Web development, Java technology
SummaryTitle=Creating objects with the JavaScript language