jskatas.org Continuously Learn JavaScript. Your Way.

Class: super in constructor

Use of super inside the constructor.

Donate to NGO Julenka. Support Ukranians in need. Julenka is an NGO which my brother founded in 2011 to support Ukranian families and kids in need.

Inside a classs constructor super()` can be used

  • extend a class and use super() to call the parent constructor
  • super() may also take params
  • it is important where you place your super() call!
  • use super.constructor to find out if there is a parent constructor