如何让原型方法先于构造函数执行

全部评论
function Test (x) {   Test.prototype.before&&Test.prototype.before(x)   console.log('construct&(11757)#39;) } Test.prototype.before = function (x) {   console.log(x); }
点赞 回复 分享
发布于 2021-03-14 14:30

相关推荐

评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务