How to create OOP Class in Javascript

后端 未结 3 1718
闹比i
闹比i 2021-01-16 05:59

I\'m hesitant to use just any tutorial because I know how those tutorials can end up being, teaching you bad ways to do things. I want to setup a class in Javascript, so th

3条回答
  •  孤城傲影
    2021-01-16 06:43

    There is nothing like classes in JavaScript. JavaScripts inheritance works with prototypes. You can take a look at base2, which mimics class-like behaviour in JavaScript.

提交回复
热议问题