三ヶ月で卒業したい。。
cIass Progate{
constructor(start,period){
this.start=start;
this.period=period;
}
greet(){
console.log("こんばんは");
}
info(){
this.greet();
console.log('progateの有料版を${this.start}');
console.log('今は${this.period}ヶ月目です');
}
}
class D extends Progate{
getMyPeriod(){
return this.period*3;
}
}
const d = new D("開始しました",1);
d.info();
const myPeriod=getMyPeriod();
console.log('期限は${myPeriod}ヶ月です');
この記事が気に入ったらサポートをしてみませんか?