Is there a way to override Javascript's delete operator to some custom function.
I've used Object.defineProperty(obj, "prop", { get: ..., set: ... })
to override the default getter and setter but I also need to get the delete event.
No, you can not override JavaScript's delete
operator.
you can see an interesting blog on Why not Operator Overloading in JavaScript? here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With