Answer the question
In order to leave comments, you need to log in
Do I need to create variables inside object methods?
Good afternoon.
Not so long ago I started learning OOP in js.
I am rewriting the code to this standard, for the convenience of interacting directly with objects. Before that, there were many functions, some of which used global variables that were higher (so that other functions could have access).
For example:
let table = document.getElemetsByClassName("tab")[0]
Obj = {table : document.getElemetsByClassName("tab")[0]}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question