How to convert “old style” class to “new style” class in javascript?

前端 未结 0 565
栀梦
栀梦 2021-02-12 20:52

Suppose to have a code writte like this in javascript

function Exam(n, g) {
    this.name = n;
    this.grade = g;
}

Exam.prototype.setName = function setName(n)         


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