JSFiddle - React, Tailwind, and code Playground

by skwjdgn

JavaScript

class Person {
	constructor(name, gender, birth){
  		this.name = name;
      this.gender = gender;
      this.birth = birth;
  }
  static see(){}
  static listen(){}
  static say(msg){
  	console.log(msg);
  }
  static touch(){}
  static feel(){}
  static move(){}
}

class Korean extends Person {
    constructor(name, gender, birth){
       super(name, gender, birth);
    }
    introduce(){
   	 Korean.say(`안녕하세요. 저는 ${this.name} 입니다. 성별은 ${this.gender} 이고, 생일은 		${this.birth} 입니다.`);
    }
  	
}

class Job{
	constructor(resume){
  	this.resume = resume;
  }
}
function getJob(o){
	o.addResume = function(p){ this.job = p; }
  o.getResume = function(){ return this.job.resume }

}
getJob(Person.prototype);

const pjh = new Korean("박정후", "male", "900910");
pjh.addResume(new Job(pjh));
console.log(pjh.getResume());