언어/javascript

javascript : 프로토타입으로 메서드 생성

하이후에호 2020. 12. 9. 15:47
반응형
function Student(name, korean, math, english, science){
    this.이름 =  name;
    this.국어 = korean;
    this.수학 = math;
    this.영어 = english;
    this.과학 = science;
}

Student.prototype.getSum = function(){};
Student.prototype.getAvarage = function(){};
Student.prototype.gettoString = function(){};
반응형