From c0bd294cd78ebc41eefe7a759500dc5154b99901 Mon Sep 17 00:00:00 2001 From: Dennis Dang Date: Wed, 31 May 2017 12:05:02 -0700 Subject: [PATCH 1/8] Update article.md Hi, I suggest a typo correction from "the" to "that" found in the summary. - `event.currentTarget` (=`this`) -- the current element handles the event (the one that has the handler on it) I'm new to github, so I'm welcome to any tips on writing better descriptions and proposals. Thanks, --- 2-ui/2-events/02-bubbling-and-capturing/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2-ui/2-events/02-bubbling-and-capturing/article.md b/2-ui/2-events/02-bubbling-and-capturing/article.md index 8001f69b..a3ee986d 100644 --- a/2-ui/2-events/02-bubbling-and-capturing/article.md +++ b/2-ui/2-events/02-bubbling-and-capturing/article.md @@ -193,7 +193,7 @@ The event handling process: Each handler can access `event` object properties: - `event.target` -- the deepest element that originated the event. -- `event.currentTarget` (=`this`) -- the current element the handles the event (the one that has the handler on it) +- `event.currentTarget` (=`this`) -- the current element that handles the event (the one that has the handler on it) - `event.eventPhase` -- the current phase (capturing=1, bubbling=3). Any event handler can stop the event by calling `event.stopPropagation()`, but that's not recommended, because we can't really be sure we won't need it above, maybe for completely different things. From aae880b32a6717cc661a62679bad2494983f5681 Mon Sep 17 00:00:00 2001 From: Aman Bangad Date: Fri, 2 Jun 2017 09:50:33 -0400 Subject: [PATCH 2/8] Typo fix --- .../05-native-prototypes/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/07-object-oriented-programming/05-native-prototypes/article.md b/1-js/07-object-oriented-programming/05-native-prototypes/article.md index 949e2d57..6c29c7f1 100644 --- a/1-js/07-object-oriented-programming/05-native-prototypes/article.md +++ b/1-js/07-object-oriented-programming/05-native-prototypes/article.md @@ -156,7 +156,7 @@ function showArgs() { */!* } -showList("John", "Pete", "Alice"); // John - Pete - Alice +showArgs("John", "Pete", "Alice"); // John - Pete - Alice ``` Because `join` resides in `Array.prototype`, we can call it from there directly and rewrite it as: From 51cb8a2b5f7d680c324f590a6c59074907f6d3de Mon Sep 17 00:00:00 2001 From: Aman Bangad Date: Fri, 2 Jun 2017 10:09:25 -0400 Subject: [PATCH 3/8] code broken fix for age being undefined --- .../07-object-oriented-programming/08-class-patterns/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/07-object-oriented-programming/08-class-patterns/article.md b/1-js/07-object-oriented-programming/08-class-patterns/article.md index c862d907..e12b3af7 100644 --- a/1-js/07-object-oriented-programming/08-class-patterns/article.md +++ b/1-js/07-object-oriented-programming/08-class-patterns/article.md @@ -47,7 +47,7 @@ function User(name, birthday) { *!* // only visible from other methods inside User function calcAge() { - new Date().getFullYear() - birthday.getFullYear(); + return new Date().getFullYear() - birthday.getFullYear(); } */!* From 070c033daebb2702b55bcd85c03be60fd638b044 Mon Sep 17 00:00:00 2001 From: Aman Bangad Date: Fri, 2 Jun 2017 10:10:37 -0400 Subject: [PATCH 4/8] broken code fix for undefined being returned --- .../07-object-oriented-programming/08-class-patterns/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/07-object-oriented-programming/08-class-patterns/article.md b/1-js/07-object-oriented-programming/08-class-patterns/article.md index c862d907..92fcd164 100644 --- a/1-js/07-object-oriented-programming/08-class-patterns/article.md +++ b/1-js/07-object-oriented-programming/08-class-patterns/article.md @@ -76,7 +76,7 @@ Like this: function User(name, birthday) { // only visible from other methods inside User function calcAge() { - new Date().getFullYear() - birthday.getFullYear(); + return new Date().getFullYear() - birthday.getFullYear(); } return { From 40d83c4bc674bd4667af935f7244c6d1d4d10ae7 Mon Sep 17 00:00:00 2001 From: Aman Bangad Date: Fri, 2 Jun 2017 11:11:24 -0400 Subject: [PATCH 5/8] bug fix --- 1-js/07-object-oriented-programming/09-class/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/07-object-oriented-programming/09-class/article.md b/1-js/07-object-oriented-programming/09-class/article.md index 9c757722..cb1beec0 100644 --- a/1-js/07-object-oriented-programming/09-class/article.md +++ b/1-js/07-object-oriented-programming/09-class/article.md @@ -294,7 +294,7 @@ class Article { */!* } -let article = article.createTodays(); +let article = Article.createTodays(); alert( articles.title ); // Todays digest ``` From 817dbd94f47dc6484ba4ec9fa3de0d138c39be79 Mon Sep 17 00:00:00 2001 From: Aman Bangad Date: Fri, 2 Jun 2017 11:17:54 -0400 Subject: [PATCH 6/8] Update article.md adding this --- .../10-class-inheritance/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/07-object-oriented-programming/10-class-inheritance/article.md b/1-js/07-object-oriented-programming/10-class-inheritance/article.md index a26f7bcb..1fe66877 100644 --- a/1-js/07-object-oriented-programming/10-class-inheritance/article.md +++ b/1-js/07-object-oriented-programming/10-class-inheritance/article.md @@ -125,7 +125,7 @@ class Rabbit extends Animal { *!* stop() { super.stop(); // call parent stop - hide(); // and then hide + this.hide(); // and then hide } */!* } From b4537536f54a56b9cd4c91025a734c2e221f28c8 Mon Sep 17 00:00:00 2001 From: Alistair Laing Date: Fri, 2 Jun 2017 22:19:15 +0100 Subject: [PATCH 7/8] Visual Studio is available for Mac --- 1-js/01-getting-started/2-code-editors/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/01-getting-started/2-code-editors/article.md b/1-js/01-getting-started/2-code-editors/article.md index d3378dc0..8a835e61 100644 --- a/1-js/01-getting-started/2-code-editors/article.md +++ b/1-js/01-getting-started/2-code-editors/article.md @@ -20,7 +20,7 @@ If you haven't considered selecting an IDE, look at the following variants: - [Komodo IDE](http://www.activestate.com/komodo-ide) and it's lightweight free version [Komodo Edit](http://www.activestate.com/komodo-edit). - [Netbeans](http://netbeans.org/). -All of them with the exception of Visual Studio are cross-platform. +All of them with the exception of Visual Studio are cross-platform. Visual Studio is now available for Mac and for Windows (https://www.visualstudio.com/vs/visual-studio-mac/) Most IDEs are paid, but have a trial period. Their cost is usually negligible compared to a qualified developer's salary, so just choose the best one for you. From be55b7d7e88f588174c77f1d1fa015be1f96279b Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Sat, 3 Jun 2017 09:29:53 +0300 Subject: [PATCH 8/8] Update article.md --- 1-js/03-code-quality/06-polyfills/article.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/1-js/03-code-quality/06-polyfills/article.md b/1-js/03-code-quality/06-polyfills/article.md index ee52a5a2..37ea9f89 100644 --- a/1-js/03-code-quality/06-polyfills/article.md +++ b/1-js/03-code-quality/06-polyfills/article.md @@ -9,13 +9,13 @@ So it's quite common for an engine to implement only the part of the standard. A good page to see the current state of support for language features is (it's big, we have a lot to study yet). -## Babel.JS +## Babel When we use modern features of the language, some engines may fail to support such code. Just as said, not all features are implemented everywhere. -Here Babel.JS comes to the rescue. +Here Babel comes to the rescue. -[Babel.JS](https://babeljs.io) is a [transpiler](https://en.wikipedia.org/wiki/Source-to-source_compiler). It rewrites modern JavaScript code into the previous standard. +[Babel](https://babeljs.io) is a [transpiler](https://en.wikipedia.org/wiki/Source-to-source_compiler). It rewrites modern JavaScript code into the previous standard. Actually, there are two parts in Babel: @@ -33,7 +33,7 @@ Actually, there are two parts in Babel: So, we need to setup the transpiler and add the polyfill for old engines to support modern features. -If we orient towards modern engines and do not use features except those supported everywhere, then we don't need to use Babel.JS. +If we orient towards modern engines and do not use features except those supported everywhere, then we don't need to use Babel. ## Examples in the tutorial