70. class Snake extends Animal {
constructor(name: string) { super(name); }
move(meters = 5) {
alert(Slithering...);
super.move(meters);
}
}
var sam = new Snake(Sammy the Python);
sam.move();
code : http://www.typescriptlang.org/Handbook#classes
구조적인 언어를 품은 FE개발
(CoffeScript,
302. // lib/math.js
export function sum(x, y) {
return x + y;
}
export var pi = 3.141593;
// app.js
import * as math from lib/math;
alert(2π = + math.sum(math.pi, math.pi));
modules