function Person() { }
class Student { }
const temp = {
age: "15"
};
Person.prototype = temp;
Student.prototype = temp;
console.log(
Person.prototype === temp, // true
Student.prototype === temp // false
);
function Person() { }
class Student { }
const temp = {
age: "15"
};
Person.prototype = temp;
Student.prototype = temp;
console.log(
Person.prototype === temp, // true
Student.prototype === temp // false
);