New ECMAScript 5.1 has new methods
create() and
defineProperties() method.Using
create() method you can create new object.Using
defineProperties() method can be used to create new properties for the given object.In this
Demo, "
We will create new object using create() method and add new property using defineProperties() method".Below code uses the
create() method to make
student1 object and uses
defineProperties() method to add new properties
subject and
mark.function Student(name) {
thi...
Published on November 12, 2014 08:13