In Javascript, what excutes first: Class Properties or the Constructor?

In most languages its the Properties first, but with how javascript doesn’t conform to normal OOP and instead uses a prototypal inheritance model I wanted to double check.

As per usual, when I test things out in js I’m either using the browser console or Quokka the Vscode extension.

I wrote this small script out which uses a generator (something I don’t use much).

  function* when(){
    let i = 0;
      yield i;
  const w = when()
  const next = () =>

  class Test{
    prop = next()
      this.constr = next()
  const t = new Test()

The output proves that like most other languages the props get evaluated first and the constructor second.

Object { prop: 0, constr: 1 }
EMAIL: ved.acnaz@mas
PHONE: 3566 664 848 1+
Made with by Sam Zanca