Skip to content

Commit 5191617

Browse files
committed
2 parents 90aa323 + 653a401 commit 5191617

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

1-js/01-getting-started/2-code-editors/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you haven't considered selecting an IDE, look at the following variants:
2020
- [Komodo IDE](http://www.activestate.com/komodo-ide) and it's lightweight free version [Komodo Edit](http://www.activestate.com/komodo-edit).
2121
- [Netbeans](http://netbeans.org/).
2222

23-
All of them with the exception of Visual Studio are cross-platform.
23+
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/)
2424

2525
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.
2626

1-js/03-code-quality/06-polyfills/article.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ So it's quite common for an engine to implement only the part of the standard.
99

1010
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).
1111

12-
## Babel.JS
12+
## Babel
1313

1414
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.
1515

16-
Here Babel.JS comes to the rescue.
16+
Here Babel comes to the rescue.
1717

18-
[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.
18+
[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.
1919

2020
Actually, there are two parts in Babel:
2121

@@ -33,7 +33,7 @@ Actually, there are two parts in Babel:
3333

3434
So, we need to setup the transpiler and add the polyfill for old engines to support modern features.
3535

36-
If we orient towards modern engines and do not use features except those supported everywhere, then we don't need to use Babel.JS.
36+
If we orient towards modern engines and do not use features except those supported everywhere, then we don't need to use Babel.
3737

3838
## Examples in the tutorial
3939

1-js/07-object-oriented-programming/05-native-prototypes/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ function showArgs() {
156156
*/!*
157157
}
158158

159-
showList("John", "Pete", "Alice"); // John - Pete - Alice
159+
showArgs("John", "Pete", "Alice"); // John - Pete - Alice
160160
```
161161

162162
Because `join` resides in `Array.prototype`, we can call it from there directly and rewrite it as:

1-js/07-object-oriented-programming/08-class-patterns/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function User(name, birthday) {
4747
*!*
4848
// only visible from other methods inside User
4949
function calcAge() {
50-
new Date().getFullYear() - birthday.getFullYear();
50+
return new Date().getFullYear() - birthday.getFullYear();
5151
}
5252
*/!*
5353

@@ -76,7 +76,7 @@ Like this:
7676
function User(name, birthday) {
7777
// only visible from other methods inside User
7878
function calcAge() {
79-
new Date().getFullYear() - birthday.getFullYear();
79+
return new Date().getFullYear() - birthday.getFullYear();
8080
}
8181

8282
return {

1-js/07-object-oriented-programming/09-class/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ class Article {
294294
*/!*
295295
}
296296

297-
let article = article.createTodays();
297+
let article = Article.createTodays();
298298

299299
alert( articles.title ); // Todays digest
300300
```

1-js/07-object-oriented-programming/10-class-inheritance/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class Rabbit extends Animal {
125125
*!*
126126
stop() {
127127
super.stop(); // call parent stop
128-
hide(); // and then hide
128+
this.hide(); // and then hide
129129
}
130130
*/!*
131131
}

2-ui/2-events/02-bubbling-and-capturing/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ The event handling process:
193193
Each handler can access `event` object properties:
194194

195195
- `event.target` -- the deepest element that originated the event.
196-
- `event.currentTarget` (=`this`) -- the current element the handles the event (the one that has the handler on it)
196+
- `event.currentTarget` (=`this`) -- the current element that handles the event (the one that has the handler on it)
197197
- `event.eventPhase` -- the current phase (capturing=1, bubbling=3).
198198

199199
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.

0 commit comments

Comments
 (0)