Question 1 of 16
JavaScript Classes — Quiz
Check your understanding of class values, constructors, fields, private elements, inheritance, super, and static initialization.
Knowledge check
JavaScript Classes — Quiz
Check your understanding of class values, constructors, fields, private elements, inheritance, super, and static initialization.
- Skip a hard question and review it before your results.
- Questions and answer options can shuffle between attempts.
You can retake this quiz whenever you like.
Question 2 of 16
What does a class expression evaluate to?
Question 3 of 16
What role does a constructor method normally have in a base class?
Question 4 of 16
Where is an ordinary class instance method defined?
Question 5 of 16
What strictness applies to code inside a class definition?
Question 6 of 16
What does an instance field create?
Question 7 of 16
Can an instance field initializer use an earlier field through this?
Question 8 of 16
Where is a static field or method associated?
Question 9 of 16
What relationship does extends establish?
Question 10 of 16
Why must a derived constructor call super() before accessing this?
Question 11 of 16
When super.speak() is called from Dog.prototype.speak(), what is this inside the inherited method?
Question 12 of 16
How is a private field accessed from class code?
Question 13 of 16
Which statement describes a private method such as #read?
Question 14 of 16
What does #value in object test inside the class that declares #value?
Question 15 of 16
When do static initialization blocks execute?
Question 16 of 16
Where does a static private element belong?
Quiz results
Review
-
What does a class declaration bind to its name?Hint used
-
What does a class expression evaluate to?Hint used
-
What role does a constructor method normally have in a base class?Hint used
-
Where is an ordinary class instance method defined?Hint used
-
What strictness applies to code inside a class definition?Hint used
-
What does an instance field create?Hint used
-
Can an instance field initializer use an earlier field through this?Hint used
-
Where is a static field or method associated?Hint used
-
What relationship does extends establish?Hint used
-
Why must a derived constructor call super() before accessing this?Hint used
-
When super.speak() is called from Dog.prototype.speak(), what is this inside the inherited method?Hint used
-
How is a private field accessed from class code?Hint used
-
Which statement describes a private method such as #read?Hint used
-
What does #value in object test inside the class that declares #value?Hint used
-
When do static initialization blocks execute?Hint used
-
Where does a static private element belong?Hint used