Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…nto en
  • Loading branch information
iliakan committed Jun 3, 2017
2 parents 90aa323 + 653a401 commit 5191617
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion 1-js/01-getting-started/2-code-editors/article.md
Expand Up @@ -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.

Expand Down
8 changes: 4 additions & 4 deletions 1-js/03-code-quality/06-polyfills/article.md
Expand Up @@ -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 <https://kangax.github.io/compat-table/es6/> (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:

Expand All @@ -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

Expand Down
Expand Up @@ -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:
Expand Down
Expand Up @@ -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();
}
*/!*

Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion 1-js/07-object-oriented-programming/09-class/article.md
Expand Up @@ -294,7 +294,7 @@ class Article {
*/!*
}

let article = article.createTodays();
let article = Article.createTodays();

alert( articles.title ); // Todays digest
```
Expand Down
Expand Up @@ -125,7 +125,7 @@ class Rabbit extends Animal {
*!*
stop() {
super.stop(); // call parent stop
hide(); // and then hide
this.hide(); // and then hide
}
*/!*
}
Expand Down
2 changes: 1 addition & 1 deletion 2-ui/2-events/02-bubbling-and-capturing/article.md
Expand Up @@ -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.
Expand Down

0 comments on commit 5191617

Please sign in to comment.