JavaScript『class{}』

「とほほのWWW入門」http://www.tohoho-web.com/www.htm
「MDN」https://developer.mozilla.org/ja/docs/Web/JavaScript
関連タイピング
-
全記号数字タイピング練習(108文字×100問,2分間ランダム)
プレイ回数5408英語長文120秒 -
プログラミングを学びたい方は是非!2013/07/03公開
プレイ回数34万1071打 -
プレイ回数117英語60秒
-
メソッド名やクラス名をタイピングしよう
プレイ回数60長文英字60秒 -
超ロングコマンドがたくさん流れてくるので時間がかかります。
プレイ回数777長文英字2139打 -
プレイ回数599短文9打
-
プログラミングで良く使う構文を練習します
プレイ回数589英字615打 -
Reactを頑張ろう
プレイ回数816英語長文120秒
問題文
(class Signal{})
class Signal{}
(class Signal{constructor(Color){this.color=Color;} info(){console.log(this.color);}})
class Signal{constructor(Color){this.color=Color;} info(){console.log(this.color);}}
(const stop=new Signal('red');)
const stop=new Signal('red');
(stop.color;)
stop.color;
(stop.info();)
stop.info();
(class Line {static send(){console.log('Hello!');}})
class Line {static send(){console.log('Hello!');}}
(Line.send();)
Line.send();
(class Akb {constructor(member){this.name=member;}})
class Akb {constructor(member){this.name=member;}}
(class Hkt extends Akb{})
class Hkt extends Akb{}
(const rino=new Hkt('Rino'); console.log(rino.name);)
const rino=new Hkt('Rino'); console.log(rino.name);
(class Square{constructor(value){this.length=value;} area(){return this.length**2;}})
class Square{constructor(value){this.length=value;} area(){return this.length**2;}}
(class Cube extends Square {volume(){return this.length**3;}})
class Cube extends Square {volume(){return this.length**3;}}
(const box=new Cube(10); console.log(box.area(),box.volume());)
const box=new Cube(10); console.log(box.area(),box.volume());
(class Signal {constructor(Color){this.color=Color;}})
class Signal {constructor(Color){this.color=Color;}}
(class Singo extends Signal {constructor(mean){super('blue');this.mean=mean;})
class Singo extends Signal {constructor(mean){super('blue');this.mean=mean;}
(info() {console.log(`${this.color} is ${this.mean}`);}})
info() {console.log(`${this.color} is ${this.mean}`);}}
(const blue=new Singo('Go'); blue.info();)
const blue=new Singo('Go'); blue.info();
(class Blog {info(){alert('updated');}})
class Blog {info(){alert('updated');}}
(class Fb extends Blog {info2(){super.info();}})
class Fb extends Blog {info2(){super.info();}}
(const fb=new Fb(); fb.info2();)
const fb=new Fb(); fb.info2();
(class Akb {constructor(member){this.name=member;})
class Akb {constructor(member){this.name=member;}
(info(){alert(`${this.name} was Akb`);}})
info(){alert(`${this.name} was Akb`);}}
(class Hkt extends Akb{})
class Hkt extends Akb{}
(const rino=new Hkt('Rino'); rino.info();)
const rino=new Hkt('Rino'); rino.info();
(const Akb= class{constructor(winner){this.center=winner;}})
const Akb= class{constructor(winner){this.center=winner;}}
(const atuko=new Akb('Atuko'); console.log(atuko.center);)
const atuko=new Akb('Atuko'); console.log(atuko.center);