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. 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 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: 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..83c312a2 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(); } */!* @@ -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 { 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 ``` 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 } */!* } 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.