1function Foo(){ 2 Foo.a = function(){ 3 console.log(1); 4 } 5 this.a = function(){ 6 console.log(2) 7 } 8} 9 10Foo.prototype.a = function(){ 11 console.log(3); 12} 13 14Foo.a = function(){ 15 console.log(4); 16} 17 18Foo.a(); 19let obj = new Foo(); 20obj.a(); 21Foo.a();