Closed DevilRoshan closed 4 years ago
出自小程序前端面试星球
// 以下代码输出 var F = function(){} Object.prototype.a = function(){console.log('a')} Function.prototype.b = function(){console.log('b')} var f = new F() F.a() F.b() f.a() f.b()
https://github.com/DevilRoshan/Question/blob/master/20200730-js-code-prototype.md