Skip to content
Latest: Publish JavaScript Packages to NPM Like a Pro!

Edit It: What happens if you access 'this' before 'super' in a derived class's constructor?

Home>super Keyword in JavaScript>Edit It: What happens if you access 'this' before 'super' in a derived class's constructor?

Edit It: What happens if you access 'this' before 'super' in a derived class's constructor?

This code shows that using the keyword this before super in a derived class's constructor will cause the browser to throw a ReferenceError.

See it on StackBlitz