inheritance
by Paco86
JavaScript
function Person(){}
Person.prototype.dance = "dd";
function Student(){}
Student.prototype = new Person();
Object.defineProperty(Student.prototype, 'constructor', {
enumerable: false,
value: Student,
writable: true
})
var s = new Student();
console.log(s.constructor);