16/09/09 16:45:04.06 dcApvFQ/.net
lengthって名前の関数を作るときなんですが、
var Sample = function() {
this.length = function() {
return 100;
}
};
Sample.length = function() {
return 100;
};
let sample = new Sample();
console.log(sample.length()); // これは OK
console.log(Sample.length()); // これは エラー
っていう動作になるのはこういう仕様でしょうか?