在JavaScript中在函数内与函数外声明原型

时间:2018-10-12 15:44:01

标签: javascript prototype

我想知道JavaScript中的以下内容之间是否有区别:

Execute sudo subscription-manager repos --list-enabled to see all actually enabled subscriptions.
Execute sudo subscription-manager repos --list to see all subscriptions that are available for you.
Execute sudo subscription-manager repos --enable <repo> if you want to add additional repos.

function Person(name, family) {
    this.name = name;
    this.family = family;
}

Person.prototype.getFull = function() {
    return this.name + " " + this.family;
};

0 个答案:

没有答案