Skip to content

Commit 5fedd0a

Browse files
change ES7/8/9 to ES2016/17/18 and fix paypal link in readme
1 parent 279defe commit 5fedd0a

6 files changed

+17
-19
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
This book is intended for somebody already familiar with the basics of JavaScript, as I am only focusing on the new features introduced by ES6 and I won't be explaining what is a `var`, how to create a function, etc...
88

9-
Additional chapters cover the new features introduced post ES6 all the way to the most recent version, ES9(ES2018).
9+
Additional chapters cover the new features introduced post ES6 (ES2015) all the way to the most recent version, ES2018.
1010

1111
## About me
1212

@@ -16,7 +16,7 @@ My name is Alberto, I'm from Italy and I love programming. As I was studying ES6
1616

1717
Any contributions you make are of course greatly appreciated.
1818

19-
If you enjoy my content and you want to donate me a cup of coffee, you can do so [here](https://github.com/AlbertoMontalesi/JavaScript-ES6-for-beginners-ebook/tree/33fc6a922b67c3f7e105bd14b3828b77a67ebdb4/paypal.me/albertomontalesi/README.md).
19+
If you enjoy my content and you want to donate me a cup of coffee, you can do so [here](https://www.paypal.me/albertomontalesi).
2020

2121
## License
2222

ebook/01_var_let_const.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# Chapter 1: Var vs Let vs Const & the temporal dead zone
22

3-
With the introduction of `let` and `const` in **ES6**, we can now better define our variable depending on our needs. Let's have a look at the major differences between them.
3+
With the introduction of `let` and `const` in **ES6**, we can now better define our variables depending on our needs. Let's have a look at the major differences between them.
44

55
 
66

77
## `Var`
88

9-
`var` are **function scoped**, which means that if we declare them inside a `for` loop (which is a **block** scope) they will be available globally.
9+
`var` are **function scoped**, which means that if we declare them inside a `for` loop (which is a **block** scope) they will be available even outside of it.
1010

1111
``` javascript
1212
for (var i = 0; i < 10; i++) {
13-
var global = "I am available globally";
13+
var leak = "I am available outside of the loop";
1414
}
1515

16-
console.log(global);
17-
// I am available globally
16+
console.log(leak);
17+
// I am available outside of the loop
1818

1919
function myFunc(){
2020
var functionScoped = "I am available inside this function";
@@ -26,7 +26,7 @@ console.log(functionScoped);
2626
// ReferenceError: functionScoped is not defined
2727
```
2828

29-
In the first example the value of the `var` global leaked out of the block-scope and could be accessed from the global scope, whereas in the second example `var` was confined inside a function-scope and we could not access it from outside.
29+
In the first example the value of the `var` leaked out of the block-scope and could be accessed from outside, whereas in the second example `var` was confined inside a function-scope and we could not access it from outside.
3030

3131
&nbsp;
3232

@@ -148,5 +148,3 @@ The second opinion comes from [Kyle Simpson:]( blog.getify.com/constantly-confus
148148
- Refactor `let` to `const` only after some code has to be written, and you're reasonably sure that you've got a case where there shouldn't be variable reassignment.
149149

150150
Which opinion to follow is entirely up to you. As always, do your own research and figure out which one you think is the best.
151-
152-
You may want to [read this article](https://medium.com/@sbakkila/javascript-es-6-let-and-the-dreaded-temporal-dead-zone-85b89314d168) to understand how `let` affects your performances compared to `var` before you choose to follow either [Mathias Bynes](https://mathiasbynens.be/notes/es6-const) or [Kyle Simpson]( blog.getify.com/constantly-confusing-const/).

ebook/17_ES7_incudes-and-exponential-operator.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Chapter 17: Everything new in ES7 (ES2016)
1+
# Chapter 17: Everything new in ES2016 (ES7)
22

33

44

5-
ES7 (or ES 2016) introduced only two new features :
5+
ES2016 introduced only two new features :
66

77
- `Array.prototype.includes()`
88
- the exponential operator
@@ -52,7 +52,7 @@ array.includes(11,-3);
5252

5353
## The exponential operator
5454

55-
Prior to ES7 we would have done this:
55+
Prior to ES2016 we would have done this:
5656

5757
``` js
5858
Math.pow(2,2);

ebook/18_ES8_string-padding-object-entries-object-values-and-more.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Chapter 18: ES8 string padding, `Object.entries()`, `Object.values()` and more
1+
# Chapter 18: ES2017 string padding, `Object.entries()`, `Object.values()` and more
22

3-
ES8 (ES2017) introduced many new cool features, which we are going to see here. I will discuss `Async` and `Await` later as they deserve more attention.
3+
ES2017 introduced many new cool features, which we are going to see here. I will discuss `Async` and `Await` later as they deserve more attention.
44

55
## String padding(`padStart` and `padEnd`)
66

ebook/19_ES8_async-and-await.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Chapter 19: ES8 Async and Await
1+
# Chapter 19: ES2017 Async and Await
22

3-
ES8 (ES2017) introuced a new way of working with promises, called "async/await".
3+
ES2017 introduced a new way of working with promises, called "async/await".
44

55
&nbsp;
66

ebook/20_ES9_what-is-coming.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Chapter 20: ES9 what is coming?
1+
# Chapter 20: ES2018 what is coming?
22

3-
ES 2018 (ES9) has not been released yet but we can look at the proposals for features that have reached the stage 4 (the final stage) and that will be included in the new upcoming version of ECMAScript.
3+
ES 2018 has not been released yet but we can look at the proposals for features that have reached the stage 4 (the final stage) and that will be included in the new upcoming version of ECMAScript.
44
You can find the list on [github](https://github.com/tc39/proposals/blob/master/finished-proposals.md).
55

66
&nbsp;

0 commit comments

Comments
 (0)