在JavaScript中使用对象原型和不使用对象原型有什么区别?

时间:2016-05-18 14:30:28

标签: javascript

如果我console.log代码我得到相同的结果。 potential.prototype.constructorpotential之间有何区别?我们如何使用它?

function potential(Action, Romantic, Drama, Comedy){
    this.Action = "Action";
    this.Romantic = "Romantic";
    this.Drama = "Drama";
    this.Comedy = "Comedy";
}

console.log(potential.prototype.constructor);
console.log(potential);

0 个答案:

没有答案