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
  • 53,428
  • 11
  • 128
  • 150
Maria
  • 3,455
  • 7
  • 34
  • 47

0 Answers0