This question has already been answered:

How to call w_2_test() in w_1_test() ?

 class TEST{ constructor(name){ this.name = name; } //методы w_1_test(){ w_2_test(); } w_2_test(){ console.log("LOG_ w_2_test()"); } } 

Reported as a duplicate at Grundy. javascript Dec 3 '18 at 7:54 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • four
    this.w_2_test (); - Vladimir Klykov
  • @ Vladimir Klykov for sure. thank you very much - Yuri Vas

1 answer 1

To access class methods within a class, you need to use the this keyword . That is, in your situation the call will look like this:

 w_1_test(){ this.w_2_test(); } 

I would like to recommend you a good course from Ilya Kantor https://learn.javascript.ru/es-class . For beginners, what you need!