Dot operator

You must use the (familiar) dot notation to access a property or invoke a method on an object instantiated off a class.

class Note {
  constructor(content) {
    this.text = content;
  }

  print() {
    console.log(this.text);
  }
}

const myNote = new Note("This is my first note!");

console.log(myNote.text); // myNote["text"] works too!

myNote.print();