var A = function() {}A.prototype.n = 1var b = new A()A.prototype = {n: 2,m: 3}var c = new A()console.log(b.n, b.m, c.n, c.m) //1 undefined 2 3
var F = function(){};Object.prototype.a = function(){console.log('a()')};Function.prototype.b = function(){console.log('b()')};var f = new F();f.a() //a()f.b() //f.b is not a functionF.a() //a()F.b() //b()
