Skip to content
🧠 Master React Package Creation — Claim Your Spot

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