JS: Understanding difference between class prototypes and function constructor prototypes

后端 未结 0 369
无人共我
无人共我 2021-01-12 06:49

First, if I have base class:

class User {
    constructor(username) {
        this.username = username
    }

    logUser() {
       return this.username;
            


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题