Any function in JavaScript can be used to create custom object classes
Any function in JavaScript can be used to create custom object classes function myobject() { this.containedValue = 0; this.othercontainedValue = 0; this.anothercontainedValue = 0; } var mything = new myobject(); And there you go, mything is now an instance of class myobject . It will have the following properties, all of which will be 0: mything.containedValue mything.othercontainedValue mything.anothercontainedValue tutorials/javascript/objects