Skip to content

Instantly share code, notes, and snippets.

@shhider
Created December 28, 2021 09:01
Show Gist options
  • Save shhider/31d981046580eb7beaaadc2bdbfa66c1 to your computer and use it in GitHub Desktop.
Save shhider/31d981046580eb7beaaadc2bdbfa66c1 to your computer and use it in GitHub Desktop.
[The order of class initialization] #javascript

The order of class initialization, as defined by JavaScript, is:

  1. The base class fields are initialized
  2. The base class constructor runs
  3. The derived class fields are initialized
  4. The derived class constructor runs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment