🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Classes, Modules, Map and Set: all 10 questions

Quiz: Classes, Modules, Map and Set · Question 6 of 10

In a child class constructor, what must happen before you use this?

In a child class constructor, what must happen before you use this?

  1. A.Nothing
  2. B.You must call this.init()
  3. C.You must call super(...)
  4. D.You must export the class
Answer & explanation

Correct answer: You must call super(...)

The parent constructor sets up the object; JavaScript throws an error if this is used first.

Can you get the rest right without peeking?

Take the timed Quiz: Classes, Modules, Map and Set quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →