jeudi 11 mai 2017

How can I get the property names of a class without having an instance of the class?

I have a class:

class Rectangle {
  constructor(height, width) {
    this.height = height;
    this.width = width;
  }
}

How can I get the properties height and width as strings without having an instance of Rectangle?





Aucun commentaire:

Enregistrer un commentaire