N
navneet.krg
create a class myClass using prototype.js's Class.create()
then create an object foo of that myClass
then "object.constructor" will return
"function Object() { [native code for Object.Object, arity=1] }"
should be myClass
does prototype.js does not set the constructor property properly
if i create the class using
function myClass(){};
foo = new myClass()
foo.constructor
will give
function myClass() {
}
then create an object foo of that myClass
then "object.constructor" will return
"function Object() { [native code for Object.Object, arity=1] }"
should be myClass
does prototype.js does not set the constructor property properly
if i create the class using
function myClass(){};
foo = new myClass()
foo.constructor
will give
function myClass() {
}