I wanted to know why I should use Reflection
in JavaScript instead of normal operators. I just knew there was Reflection
today and I wanted to know why it would be more useful to use Reflection
instead of regular operators.
An example would be to use Reflect.deleteProperty(target, key)
instead of delete target[key]
assuming target
is an object.