Answer the question
In order to leave comments, you need to log in
What is the best way to create a class in javascript?
Hello, I recently started to delve into OOP in js'e, everything seems to be clear, but still there are a couple of details that I cannot understand, one of them is what is the difference in new 'class' and object.create 'class ' what to use when creating child elements of class ?
Second, how is it better to create classes, in a prototypical or functional style? (the fact that methods are hung on prototypes, I know this) More precisely, as generally accepted, it is clear that prototypes are faster (I don’t remember for sure), but nevertheless: \
If you can, the answer is detailed, because I almost don’t found, and foreign articles are understood with difficulty (the complexity of the language).
Answer the question
In order to leave comments, you need to log in
what is the difference in new 'class' and object.create 'class',
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question