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

前端 未结 0 525
鱼传尺愫
鱼传尺愫 2021-02-12 20:41

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)         


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