mirror of
https://github.com/JeremyLikness/vanillajs-deck
synced 2025-12-15 10:43:34 +00:00
slides through modules
This commit is contained in:
19
slides/170-es5-classes.html
Normal file
19
slides/170-es5-classes.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user