vanillajs-deck/slides/170-es5-classes.html

19 lines
473 B
HTML
Raw Normal View History

2020-01-29 18:26:00 +00:00
<title>Looking Back...</title>
<h1>Looking Back...</h1>
<pre>
var shape = (function () {
function shape(sides) {
this._sides = sides;
}
Object.defineProperty(shape.prototype, "sides", {
get: function () { return this._sides; },
enumerable: true,
configurable: true
});
shape.makeShape = function (sides) {
return new shape(sides);
};
return shape;
}());
</pre>
<next-slide>173-es5-extends</next-slide>