4
JavaScript:Class.methodとClass.prototype.method
次の2つの宣言の違いは何ですか? Class.method = function () { /* code */ } Class.prototype.method = function () { /* code using this.values */ } 最初のステートメントを静的メソッドの宣言と考え、2番目のステートメントをインスタンスメソッドの宣言と考えても問題ありませんか?