adding docs

This commit is contained in:
Ken Chau
2019-11-08 16:16:29 +00:00
parent 4998c158d2
commit 7cc9c72c4e
92 changed files with 917 additions and 11198 deletions

2
step2-01/demo/bundle.js Normal file
View File

@@ -0,0 +1,2 @@
!function(n){var t={};function e(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return n[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}e.m=n,e.c=t,e.d=function(n,t,o){e.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:o})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,t){if(1&t&&(n=e(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var r in n)e.d(o,r,function(t){return n[t]}.bind(null,r));return o},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="",e(e.s=130)}({130:function(n,t,e){"use strict";e.r(t);var o,r=(o=function(n,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e])})(n,t)},function(n,t){function e(){this.constructor=n}o(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}),l=function(){return function(){}}();(function(n){function t(){return null!==n&&n.apply(this,arguments)||this}r(t,n)})(l),function(n){function t(){return null!==n&&n.apply(this,arguments)||this}r(t,n)}(l);new(function(){return function(n,t){this.make=n,this.model=t}}())("Honda","Accord");var u={hello:"world"},c=function(){return function(){this.hello="world"}}();console.log(5),console.log(5),console.log(5),console.log(u),console.log(10),console.log(5),console.log(5),console.log(u),console.log(10),console.log(true),console.log((new c).hello),console.log((new c).hello);var i=function(){function n(){this.data=[]}return n.prototype.push=function(n){this.data.push(n)},n.prototype.pop=function(){return this.data.pop()},n}();new i,new i;var a=function(n,t,e,o){return new(e||(e=Promise))(function(r,l){function u(n){try{i(o.next(n))}catch(n){l(n)}}function c(n){try{i(o.throw(n))}catch(n){l(n)}}function i(n){n.done?r(n.value):new e(function(t){t(n.value)}).then(u,c)}i((o=o.apply(n,t||[])).next())})},f=function(n,t){var e,o,r,l,u={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return l={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function c(l){return function(c){return function(l){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,o&&(r=2&l[0]?o.return:l[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,l[1])).done)return r;switch(o=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return u.label++,{value:l[1],done:!1};case 5:u.label++,o=l[1],l=[0];continue;case 7:l=u.ops.pop(),u.trys.pop();continue;default:if(!(r=(r=u.trys).length>0&&r[r.length-1])&&(6===l[0]||2===l[0])){u=0;continue}if(3===l[0]&&(!r||l[1]>r[0]&&l[1]<r[3])){u.label=l[1];break}if(6===l[0]&&u.label<r[1]){u.label=r[1],r=l;break}if(r&&u.label<r[2]){u.label=r[2],u.ops.push(l);break}r[2]&&u.ops.pop(),u.trys.pop();continue}l=t.call(n,u)}catch(n){l=[6,n],o=0}finally{e=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}};(function(){return a(this,void 0,void 0,function(){return f(this,function(n){switch(n.label){case 0:return[4,fetch("http://localhost:3000/hello")];case 1:return[4,n.sent().text()];case 2:return[2,n.sent()]}})})})().then(function(n){console.log("hello "+n)});var s=function(){return(s=Object.assign||function(n){for(var t,e=1,o=arguments.length;e<o;e++)for(var r in t=arguments[e])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}).apply(this,arguments)},p=[1,2,3,4],h=p[0],y=p[1],d=p.slice(2);console.log(h,y,d);var b=[1,2];b=b.concat([3,4]),console.log(b);s({},{x:1,y:2},{z:3}),s({},{x:1},{y:2}).x}});
//# sourceMappingURL=bundle.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,13 +1 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../../assets/step.css" />
</head>
<body class="ms-Fabric">
<div id="markdownReadme" data-src="./README.md"></div>
<div id="app">
Nothing to show here; just look at your console window for output. Hit F12 (<code>cmd+option+I</code> on Mac) to open console window.
</div>
<script src="../../assets/scripts.js"></script>
</body>
</html>
<!doctype html><html><head><link rel="stylesheet" href="../../assets/step.css"></head><body class="ms-Fabric"><div id="markdownReadme" data-src="./README.md"></div><div id="app">Nothing to show here; just look at your console window for output. Hit F12 (<code>cmd+option+I</code> on Mac) to open console window.</div><script src="../../assets/scripts.js"></script><script src="../../step2-01/demo/bundle.js"></script><script src="../../markdownReadme/bundle.js"></script></body></html>

View File

@@ -0,0 +1,2 @@
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=127)}({127:function(e,t){var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,u){function i(e){try{a(r.next(e))}catch(e){u(e)}}function l(e){try{a(r.throw(e))}catch(e){u(e)}}function a(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(i,l)}a((r=r.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var n,r,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function l(u){return function(l){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,l])}}};console.log("hello world");!function(){n(this,void 0,void 0,function(){return r(this,function(e){return[2]})})}()}});
//# sourceMappingURL=bundle.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,14 +1 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../../assets/step.css" />
</head>
<body class="ms-Fabric">
<div id="markdownReadme" class="exercise" data-src="./README.md"></div>
<div id="app">
Nothing to show here; just look at your console window for output. Hit F12 (<code>cmd+option+I</code> on Mac) to open the console
window.
</div>
<script src="../../assets/scripts.js"></script>
</body>
</html>
<!doctype html><html><head><link rel="stylesheet" href="../../assets/step.css"></head><body class="ms-Fabric"><div id="markdownReadme" class="exercise" data-src="./README.md"></div><div id="app">Nothing to show here; just look at your console window for output. Hit F12 (<code>cmd+option+I</code> on Mac) to open the console window.</div><script src="../../assets/scripts.js"></script><script src="../../step2-01/exercise/bundle.js"></script><script src="../../markdownReadme/bundle.js"></script></body></html>

2
step2-01/final/bundle.js Normal file
View File

@@ -0,0 +1,2 @@
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=149)}({149:function(e,t,n){"use strict";n.r(t);var r=function(){function e(){this._store=[]}return e.prototype.push=function(e){this._store.push(e)},e.prototype.pop=function(){return this._store.pop()},e}(),o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},u=function(e,t,n,r){return new(n||(n=Promise))(function(o,u){function i(e){try{l(r.next(e))}catch(e){u(e)}}function c(e){try{l(r.throw(e))}catch(e){u(e)}}function l(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(i,c)}l((r=r.apply(e,t||[])).next())})},i=function(e,t){var n,r,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function c(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}};console.log("hello world"),console.log("fib(FibConst) is:",function e(t){return t<=1?t:e(t-1)+e(t-2)}(3));console.log("My car:",JSON.stringify({wheels:4,color:"blue",make:"Toyota",model:"Camry"}));var c=new r;c.push(1),c.push(2),c.push(3),console.log("Number on top of the stack:",c.pop());var l=o({},{first:"who",second:"what",third:"dunno",left:"why"},{center:"because",pitcher:"tomorrow",catcher:"today"}),a=l.first,s=l.second,f=l.catcher;function p(e){return u(this,void 0,Promise,function(){return i(this,function(t){return[2,"hello "+e]})})}console.log("First:",a),console.log("Second:",s),console.log("Catcher:",f),function(){u(this,void 0,void 0,function(){var e,t;return i(this,function(n){switch(n.label){case 0:return[4,Promise.resolve(5)];case 1:return e=n.sent(),console.log("makePromise returned:",e),[4,p("Ken")];case 2:return t=n.sent(),console.log("greeting:",t),[2]}})})}()}});
//# sourceMappingURL=bundle.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,14 +1 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../../assets/step.css" />
</head>
<body class="ms-Fabric">
<div id="markdownReadme" class="exercise" data-src="./README.md"></div>
<div id="app">
Nothing to show here; just look at your console window for output. Hit F12 (<code>cmd+option+I</code> on Mac) to open the console
window.
</div>
<script src="../../assets/scripts.js"></script>
</body>
</html>
<!doctype html><html><head><link rel="stylesheet" href="../../assets/step.css"></head><body class="ms-Fabric"><div id="markdownReadme" class="exercise" data-src="./README.md"></div><div id="app">Nothing to show here; just look at your console window for output. Hit F12 (<code>cmd+option+I</code> on Mac) to open the console window.</div><script src="../../assets/scripts.js"></script><script src="../../step2-01/final/bundle.js"></script><script src="../../markdownReadme/bundle.js"></script></body></html>