The Node.js 12 release replaces version 11 in our current release line. The Node.js release line will become a Node.js Long Term Support (LTS) release in Oct 2019 

Public class fields

Instead of listing all variables with default values in the constructor, you can define them on the class level.

class Vehicle {
 constructor(type) {
   this.type = type;
   this.speed = 80;
 }
}

Thus, you can omit the constructor if no parameter is needed or just focus on the required variables on initialization.

class Vehicle2 {
 speed = 80;

 constructor(type) {
   this.type = type;
 }
}

Private class fields

JavaScript brought in the concept of private class fields which finally landed in Node.js v12. To mark fields private just give them a name starting with #.

class Counter {
 #count = 0

 increment() {
   this.#count++;
 }

 get value() {
   return this.#count;
 }
}

const counter = new Counter()
counter.increment()
counter.value // 1

counter.#value // SyntaxError

Watch out, if You try to access a private field outside of the class it throws a SyntaxError error!