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

全部评论
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 收藏 评论
分享
牛客网
牛客企业服务