Skip to content

Commit 60a8991

Browse files
change cover and readme, update quizzes
1 parent d620dc6 commit 60a8991

File tree

7 files changed

+62
-44
lines changed

7 files changed

+62
-44
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
[![HitCount](http://hits.dwyl.io/albertomontalesi/JavaScript-es6-and-beyond-ebook.svg)](http://hits.dwyl.io/albertomontalesi/JavaScript-es6-and-beyond-ebook)
1212

1313

14-
# JavaScript ES6 and beyond: Discover all the new features introduced to JavaScript from 2015 to 2018
14+
# [The Complete Guide to Modern JavaScript ](https://www.amazon.com/dp/B07DGGFNS6)
1515

16-
![book-cover](/assets/cover.png)
16+
## Discover all the new features introduced to JavaScript from 2015 to 2018
17+
18+
![book-cover](/assets/cover.jpg)
1719

1820
## Disclaimer
1921

@@ -24,14 +26,13 @@ Additional chapters cover the new features introduced post ES6 (ES2015) all the
2426

2527
## About me
2628

27-
My name is Alberto, I'm from Italy and I love programming. As I was studying ES6 I decided that the best way for me to test my understanding of it was to write articles about it. I have now packaged those articles in a free ebook that you can read here or on my blog [here](http://albertomontalesi.github.io/).
28-
29-
## Contributions & Donations [![](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://www.paypal.me/albertomontalesi)
29+
My name is Alberto, I'm from Italy and I love programming. As I was studying ES6 I decided that the best way for me to test my understanding of it was to write articles about it. I have now packaged those articles in a ebook that you can purchase on amazon.com at this [link](https://www.amazon.com/dp/B07DGGFNS6) or click [here](http://bit.ly/2kGMwKn) if you are not in the US to find the right amazon store.
3030

31+
The ebook contains 50+ extra quizzes for your to practice and test your knowledge after reading each chapter.
32+
You can have a look at the quizzes from the first two chapters in the `quizzes` folder.
3133

32-
Any contributions you make are of course greatly appreciated.
34+
You can also read my articles on my blog [here](https://www.inspiredwebdev.com/).
3335

34-
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).
3536

3637
## License
3738

assets/Cover.jpg

67.4 KB
Loading

assets/cover.png

-120 KB
Binary file not shown.

ebook/05_additional_string_methods.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ code.includes("CDE");
8787
As the name suggests, this new method will repeat what we pass in.
8888

8989
``` js
90-
9190
let hello = "Hi";
9291
console.log(hello.repeat(10));
9392
// "HiHiHiHiHiHiHiHiHiHi"

ebook/07_iterables-and-looping.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ for (const prop of Object.keys(car)){
6060

6161
## The `for in` loop
6262

63-
Even though it is not a new ES6 loop, let's look at the `for in` loop to understand what differentiate it compared to the `for of.
63+
Even though it is not a new ES6 loop, let's look at the `for in` loop to understand what differentiate it compared to the `for of`.
6464

6565
The `for in` loop is a bit different because it will iterate over all the [enumerable properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) of an object in no particular order.
6666

quizzes/01_var_let_const.md

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

3-
## End of chapter quiz
3+
## End of Chapter 1 Quiz
44

5-
1) What is the correct output of this code?
5+
### 1.1 What is the correct output of the following code?
66

77
```js
88
var greeting = "Hello";
99

1010
greeting = "Farewell";
1111

1212
for (var i = 0; i < 2; i++) {
13-
var greeting = "Goodmorning";
13+
var greeting = "Good morning";
1414
}
1515

1616
console.log(greeting);
1717
```
1818

19-
- [] Hello
20-
- [*] Goodmorning
21-
- [] Farewell;
19+
- [ ] Hello
20+
- [ ] Good morning
21+
- [ ] Farewell;
2222

2323
&nbsp;
2424

25-
2) What is the correct output of this code?
26-
25+
### 1.2 What is the correct output of the following code?
2726

2827
```js
2928
let value = 1;
@@ -36,20 +35,38 @@ if(true) {
3635
value = 3;
3736
```
3837

39-
- [] 1
40-
- [*] 2
41-
- [] 3
38+
- [ ] 1
39+
- [ ] 2
40+
- [ ] 3
4241

42+
&nbsp;
4343

44-
3) What is the correct output of this code?
44+
### 1.3 What is the correct output of the following code?
45+
46+
```js
47+
let x = 100;
48+
49+
if (x > 50) {
50+
let x = 10;
51+
}
52+
53+
console.log(x);
54+
```
55+
56+
- [ ] 10
57+
- [ ] 100
58+
- [ ] 50
59+
60+
&nbsp;
61+
62+
### 1.4 What is the correct output of the following code?
4563

4664
```js
4765
console.log(constant);
4866

4967
const constant = 1;
5068
```
5169

52-
- [] undefined
53-
- [*] ReferenceError
54-
- 1
55-
70+
- [ ] undefined
71+
- [ ] ReferenceError
72+
- [ ] 1

quizzes/02_arrow_functions.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,29 @@
11
# Chapter 2: Arrow functions
22

3-
## End of chapter quiz
3+
## End of Chapter 2 Quiz
44

5-
1) What is the correct syntax for an arrow function?
5+
### 2.1 What is the correct syntax for an arrow function?
66

77
```js
88
let arr = [1,2,3];
99

10-
a)
10+
//a)
1111
let func = arr.map(n -> n+1);
1212

13-
b)
13+
//b)
1414
let func = arr.map(n => n+1);
1515

16-
c)
16+
//c)
1717
let func = arr.map(n ~> n+1);
1818
```
1919

20-
- [] a
21-
- [] b
22-
- [*] c
23-
24-
25-
> The correct syntax for an arrow function is the so called fat arrow `=>`
20+
- [ ] a
21+
- [ ] b
22+
- [ ] c
2623

2724
&nbsp;
2825

29-
30-
// example with this keyword
31-
32-
2) What is the correct output of this code?
26+
### 2.2 What is the correct output of the following code?
3327

3428
``` js
3529
const person = {
@@ -43,9 +37,16 @@ person.grow();
4337
console.log(person.age);
4438
```
4539

46-
- [*] 10
47-
- [] 11
48-
- [] undefined
40+
- [ ] 10
41+
- [ ] 11
42+
- [ ] undefined
4943

50-
> Inside an arrow function, the `this` keyword inherits from its parent scope which in this case it's the window, therefore the `age` remains 10.
44+
&nbsp;
45+
46+
### 2.3 Refactor the following code to use the arrow function syntax:
5147

48+
```js
49+
function(arg) {
50+
console.log(arg);
51+
}
52+
```

0 commit comments

Comments
 (0)