0

In the code below, how can I access the variable User without explicitly specifying the keyword "User" inside its own class?

class User {
  say = () => {
    // Here, I have to explicitly write "User". Is there
    // some javascript trick to get the class reference inside 
    // its own class without explicitly writing the name?
    console.log(User);
  }
}
Erik Philips
  • 51,408
  • 11
  • 123
  • 146
Maria
  • 3,283
  • 7
  • 31
  • 43

0 Answers0