1×
Become a member
to unlock all features

Create egghead account to access 5000+ tutorials and resources from expert developers.

Create account
Autoplay

    Avoid Assignment Errors by Using Reflect.set

    javascriptJavaScript

    Reflect.set enables the same behavior as simply assigning a property to a value, but because it's a function, it allows you to check if the assignment completed successfully. This allows you to avoid errors when assignment fails in scenarios where the Object might be frozen or sealed.