Creating Objects from Existing Objects
Monday June 29, 2009
The easiest way to create new objects in JavaScript is to copy existing ones.
Because JavaScript is a prototyping language and doesn't have separate class definitions, there is no distingction between classes and objects (unlike other object oriented languages). This means that you can take any already existing object and copy it in JavaScript to create your new objects.
Creating Objects from Existing Objects


No comments yet. Leave a Comment