Skip to content

Commit 585c33e

Browse files
committed
fixes
1 parent 8d0e1b0 commit 585c33e

File tree

3 files changed

+41
-37
lines changed

3 files changed

+41
-37
lines changed

03_Day_Booleans_operators_date/03_booleans_operators_date.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ console.log(count++) // 0
272272
console.log(count) // 1
273273
```
274274

275-
We use most of the time post-increment. At leas you should remember how to use post-increment operator.
275+
We use most of the time post-increment. At least you should remember how to use post-increment operator.
276276

277277
### Decrement Operator
278278

@@ -571,7 +571,7 @@ console.log(`${date}/${month}/${year} ${hours}:${minutes}`) // 4/1/2020 0:56
571571
1. Slope is (m = y2-y1/x2-x1). Find the slope between point (2, 2) and point(6,10)
572572
1. Compare the slope of above two questions.
573573
1. Calculate the value of y (y = x^2 + 6x + 9). Try to use different x values and figure out at what x value y is 0.
574-
1. Writ a script that prompt a user to enters hours and rate per hour. Calculate pay of the person?
574+
1. Writ a script that prompt a user to enter hours and rate per hour. Calculate pay of the person?
575575

576576
```sh
577577
Enter hours: 40

10_Day_Sets_and_Maps/10_day_Sets_and_Maps.md

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
<img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/asabeneh?style=social">
88
</a>
99

10-
<sub>Author:
11-
<a href="https://www.linkedin.com/in/asabeneh/" target="_blank">Asabeneh Yetayeh</a><br>
12-
<small> January, 2020</small>
13-
</sub>
10+
<sub>Author:
11+
<a href="https://www.linkedin.com/in/asabeneh/" target="_blank">Asabeneh Yetayeh</a><br>
12+
<small> January, 2020</small>
13+
</sub>
14+
1415
</div>
1516

1617
[<< Day 9](../09_Day_Higher_order_functions/09_day_higher_order_functions.md) | [Day 11>>](../11_Day_Destructuring_and_spreading/11_day_destructuring_and_spreading.md)
@@ -67,7 +68,7 @@ const languages = [
6768
'French',
6869
'Spanish',
6970
'English',
70-
'French'
71+
'French',
7172
]
7273

7374
const setOfLangauges = new Set(languages)
@@ -88,7 +89,7 @@ const languages = [
8889
'French',
8990
'Spanish',
9091
'English',
91-
'French'
92+
'French',
9293
]
9394

9495
const setOfLangauges = new Set(languages)
@@ -183,7 +184,7 @@ const languages = [
183184
'French',
184185
'Spanish',
185186
'English',
186-
'French'
187+
'French',
187188
]
188189
const langSet = new Set(languages)
189190
console.log(langSet) // Set(4) {"English", "Finnish", "French", "Spanish"}
@@ -193,19 +194,19 @@ const counts = []
193194
const count = {}
194195

195196
for (const l of langSet) {
196-
const filteredLang = languages.filter(lng => lng === l)
197+
const filteredLang = languages.filter((lng) => lng === l)
197198
console.log(filteredLang) // ["English", "English", "English"]
198199
counts.push({ lang: l, count: filteredLang.length })
199200
}
200201
console.log(counts)
201202
```
202203

203204
```js
204-
[
205+
;[
205206
{ lang: 'English', count: 3 },
206207
{ lang: 'Finnish', count: 1 },
207208
{ lang: 'French', count: 2 },
208-
{ lang: 'Spanish', count: 1 }
209+
{ lang: 'Spanish', count: 1 },
209210
]
210211
```
211212

@@ -254,7 +255,7 @@ let b = [3, 4, 5, 6]
254255
let A = new Set(a)
255256
let B = new Set(b)
256257

257-
let c = a.filter(num => B.has(num))
258+
let c = a.filter((num) => B.has(num))
258259
let C = new Set(c)
259260

260261
console.log(C)
@@ -276,7 +277,7 @@ let b = [3, 4, 5, 6]
276277
let A = new Set(a)
277278
let B = new Set(b)
278279

279-
let c = a.filter(num => !B.has(num))
280+
let c = a.filter((num) => !B.has(num))
280281
let C = new Set(c)
281282

282283
console.log(C)
@@ -306,7 +307,7 @@ Map(0) {}
306307
countries = [
307308
['Finland', 'Helsinki'],
308309
['Sweden', 'Stockholm'],
309-
['Norway', 'Oslo']
310+
['Norway', 'Oslo'],
310311
]
311312
const map = new Map(countries)
312313
console.log(map)
@@ -347,7 +348,7 @@ Helsinki
347348

348349
### Checking key in Map
349350

350-
Check if a key exist in a map using *has* method. It returns *true* or *false*.
351+
Check if a key exist in a map using _has_ method. It returns _true_ or _false_.
351352

352353
```js
353354
console.log(countriesMap.has('Finland'))
@@ -416,32 +417,35 @@ const countries = ['Finland', 'Sweden', 'Norway']
416417

417418
```js
418419
// Your output should look like this
419-
console.log(mostSpokenLanguages(countries, 10))
420-
[
421-
{'English':91},
422-
{'French':45},
423-
{'Arabic':25},
424-
{'Spanish':24},
425-
{'Russian':9},
426-
{'Portuguese':9},
427-
{'Dutch':8},
428-
{'German':7},
429-
{'Chinese':5},
430-
{'Swahili':4},
431-
{'Serbian':4}]
420+
console.log(mostSpokenLanguages(countries, 10))[
421+
({ English: 91 },
422+
{ French: 45 },
423+
{ Arabic: 25 },
424+
{ Spanish: 24 },
425+
{ Russian: 9 },
426+
{ Portuguese: 9 },
427+
{ Dutch: 8 },
428+
{ German: 7 },
429+
{ Chinese: 5 },
430+
{ Swahili: 4 },
431+
{ Serbian: 4 })
432+
]
432433

433434
// Your output should look like this
434435
console.log(mostSpokenLanguages(countries, 3))
435-
436-
[
437-
{'English':91},
438-
{'French':45},
439-
{'Arabic':25}
440-
]
441436
```
442437

438+
[
439+
{'English':91},
440+
{'French':45},
441+
{'Arabic':25}
442+
]
443+
444+
```
445+
443446
444447
🎉 CONGRATULATIONS ! 🎉
445448
446449
447450
[<< Day 9](../09_Day_Higher_order_functions/09_day_higher_order_functions.md) | [Day 11>>](../11_Day_Destructuring_and_spreading/11_day_destructuring_and_spreading.md)
451+
```

11_Day_Destructuring_and_spreading/11_day_destructuring_and_spreading.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Destructuring is a way to unpack arrays, and objects and assigning to a distinct
5757

5858
```js
5959
const names = ['Asabeneh', 'Brook', 'David', 'John']
60-
let [firstPerson, secondPerson, ThirdPerson, fourth Person] = names
60+
let [firstPerson, secondPerson, thirdPerson, fourth Person] = names
6161

6262
console.log(firstName, secondPerson,thirdPerson, fourthPerson)
6363
```
@@ -108,7 +108,7 @@ If we like to skip on of the values in the array we use additional comma. The co
108108

109109
```js
110110
const names = ['Asabeneh', 'Brook', 'David', 'John']
111-
let [, secondPerson, , fourth Person] = name // first and third person is omitted
111+
let [, secondPerson, , fourthPerson] = name // first and third person is omitted
112112

113113
console.log(secondPerson, fourthPerson)
114114
```

0 commit comments

Comments
 (0)