const say = (a = 0, b = 0) => { console.log(`say~~~ a:${a}, b:${b}`) } say()
const beforeAop = () => { console.log('beforeAop') } Function.prototype.before = function (fn) { let that = this return function () { fn() that.apply(null, arguments) } } const say = (a = 0, b = 0) => { console.log(`say~~~ a:${a}, b:${b}`) } let newSay = say.before(beforeAop) newSay(1, 2)