JSFiddle - React, Tailwind, and code Playground
by kassiomaia
JavaScript
function call(value) {
return value
}
const proxy = new Proxy(call, {
apply: function(target, thisArg, arg1) {
return target(...arg1) + 40
}
})
console.log(proxy(20))
by kassiomaia
function call(value) {
return value
}
const proxy = new Proxy(call, {
apply: function(target, thisArg, arg1) {
return target(...arg1) + 40
}
})
console.log(proxy(20))