Skip to content

Commit b094b3f

Browse files
committed
fixes
1 parent 07143be commit b094b3f

File tree

8 files changed

+39
-45
lines changed

8 files changed

+39
-45
lines changed

03_Day_Booleans_operators_date/03_booleans_operators_date.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ These are not all the window methods we will have a separate section to go deep
382382
## Date Object
383383

384384
Time is an important thing. We like to know the time a certain activity or event. In JavaScript current time and date is created using JavaScript Date Object. The object we create using Date object provides many methods to work with date and time.The methods we use to get date and time information from a date object values are started with a word _get_ because it provide the information.
385-
_getFullYear(), getMonths(), getDate(), getDay(), getHours(), getMinutes, getSeconds(), getMilliseconds(), getTime(), getDay()_
385+
_getFullYear(), getMonth(), getDate(), getDay(), getHours(), getMinutes, getSeconds(), getMilliseconds(), getTime(), getDay()_
386386

387387
![Date time Object](../images/date_time_object.png)
388388

@@ -553,7 +553,7 @@ console.log(`${date}/${month}/${year} ${hours}:${minutes}`) // 4/1/2020 0:56
553553
```sh
554554
Enter base: 20
555555
Enter height: 10
556-
The area of the triangle is 50
556+
The area of the triangle is 100
557557
```
558558

559559
1. Write a script that prompt the user to enter side a, side b, and side c of the triangle and and calculate the perimeter of triangle (perimeter = a + b + c)

05_Day_Arrays/05_day_arrays.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</sub>
1414
</div>
1515

16-
[<< Day 4](../04_Day_Conditionals/04_day_Conditionals.md) | [Day 6 >>](../06_Day_Loops/06_day_loops.md)
16+
[<< Day 4](../04_Day_Conditionals/04_day_conditionals.md) | [Day 6 >>](../06_Day_Loops/06_day_loops.md)
1717

1818
![Day 5](../images/banners/day_1_5.png)
1919

06_Day_Loops/06_day_loops.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ for (const num of numbers) {
178178
// adding all the numbers in the array
179179
let sum = 0
180180
for (const num of numbers) {
181-
sum += sum + num // can be also shorten like this, sum += num
181+
sum = sum + num // can be also shorten like this, sum += num
182182
}
183183
console.log(sum) // 15
184184

10_Day_Sets_and_Maps/10_day_Sets_and_Maps.md

+14-20
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ console.log(C)
241241

242242
```sh
243243
Set(6) {1, 2, 3, 4, 5,6}
244-
245244
```
246245

247246
### Intersection of sets
@@ -263,7 +262,6 @@ console.log(C)
263262

264263
```sh
265264
Set(3) {3, 4, 5}
266-
267265
```
268266

269267
### Difference of sets
@@ -285,7 +283,6 @@ console.log(C)
285283

286284
```sh
287285
Set(2) {1, 2}
288-
289286
```
290287

291288
## Map
@@ -372,7 +369,7 @@ for (const country of countriesMap) {
372369
(2) ["Norway", "Oslo"]
373370
```
374371

375-
```sh
372+
```js
376373
for (const [country, city] of countriesMap){
377374
console.log(country, city)
378375
}
@@ -415,10 +412,11 @@ const countries = ['Finland', 'Sweden', 'Norway']
415412

416413
1. \*\*\* Use the countries data to find the 10 most spoken languages:
417414

418-
```js
415+
```js
419416
// Your output should look like this
420-
console.log(mostSpokenLanguages(countries, 10))[
421-
({ English: 91 },
417+
console.log(mostSpokenLanguages(countries, 10))
418+
[
419+
{ English: 91 },
422420
{ French: 45 },
423421
{ Arabic: 25 },
424422
{ Spanish: 24 },
@@ -428,24 +426,20 @@ const countries = ['Finland', 'Sweden', 'Norway']
428426
{ German: 7 },
429427
{ Chinese: 5 },
430428
{ Swahili: 4 },
431-
{ Serbian: 4 })
429+
{ Serbian: 4 }
432430
]
433431

434-
// Your output should look like this
435-
console.log(mostSpokenLanguages(countries, 3))
436-
```
437-
438-
[
439-
{'English':91},
440-
{'French':45},
441-
{'Arabic':25}
442-
]
443-
432+
// Your output should look like this
433+
console.log(mostSpokenLanguages(countries, 3))
434+
[
435+
{'English':91},
436+
{'French':45},
437+
{'Arabic':25}
438+
]
444439
```
445440

446441

447442
🎉 CONGRATULATIONS ! 🎉
448443

449444

450-
[<< 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-
```
445+
[<< 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)

11_Day_Destructuring_and_spreading/11_day_destructuring_and_spreading.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ 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, fourthPerson] = names
6161

62-
console.log(firstName, secondPerson,thirdPerson, fourthPerson)
62+
console.log(firstPerson, secondPerson,thirdPerson, fourthPerson)
6363
```
6464

6565
```sh

18_Day_Promises/18_day_promises.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ doPromise
172172
The Fetch API provides an interface for fetching resources (including across the network). It will seem familiar to anyone who has used XMLHttpRequest, but the new API provides a more powerful and flexible feature set. In this challenge we will use fetch to request url and APIS. In addition to that let us see demonstrate use case of promises in accessing network resources using the fetch API.
173173

174174
```js
175-
const url = 'https://restcountries.eu/rest/v2/all' // countries api
175+
176+
const url = 'https://restcountries.com/v2/all' // countries api
176177
fetch(url)
177178
.then(response => response.json()) // accessing the API data as JSON
178179
.then(data => { // getting the data
@@ -219,7 +220,7 @@ Let us fetch API data using both promise method and async and await method.
219220
- promise
220221

221222
```js
222-
const url = 'https://restcountries.eu/rest/v2/all'
223+
const url = 'https://restcountries.com/v2/all'
223224
fetch(url)
224225
.then(response => response.json())
225226
.then(data => {
@@ -249,7 +250,7 @@ fetchData()
249250
## Exercises
250251

251252
```js
252-
const countriesAPI = 'https://restcountries.eu/rest/v2/all'
253+
const countriesAPI = 'https://restcountries.com/v2/all'
253254
const catsAPI = 'https://api.thecatapi.com/v1/breeds'
254255
```
255256

21_Day_DOM/21_day_dom.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ const titles = document.querySelectorAll('h1')
214214
titles[3].textContent = 'Fourth Title'
215215
```
216216

217-
#### Adding Text Content using innHTML
217+
#### Adding Text Content using innerHTML
218218

219219
Most people get confused between _textContent_ and _innerHTML_. _textContent_ is meant to add text to an HTML element, however innerHTML can add a text or HTML element or elements as a child.
220220

readMe.md

+14-15
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ console.log('Hello, World!')
205205

206206
##### Console.log with Multiple Arguments
207207

208-
The **conole.log()** function can take multiple parameters separated by comma. The syntax looks like as follows:**console.log(param1, param2, param3)**
208+
The **console.log()** function can take multiple parameters separated by comma. The syntax looks like as follows:**console.log(param1, param2, param3)**
209209

210210
![console log multiple arguments](./images/console_log_multipl_arguments.png)
211211

@@ -231,11 +231,11 @@ We add comments to our code. Comments are very important to make code more reada
231231

232232
**Example: Multiline Comment**
233233

234-
/_
234+
/*
235235
This is a multiline comment
236236
Multiline comments can take multiple lines
237237
JavaScript is the language of the web
238-
_/
238+
*/
239239

240240
##### Syntax
241241

@@ -527,18 +527,18 @@ Multiline commenting:
527527

528528
```js
529529
/*
530-
let location = 'Helsinki';
531-
let age = 100;
532-
let isMarried = true;
533-
This is a Multiple line comment
534-
*/
530+
let location = 'Helsinki';
531+
let age = 100;
532+
let isMarried = true;
533+
This is a Multiple line comment
534+
*/
535535
```
536536

537537
## Variables
538538

539539
Variables are _containers_ of data. Variables are used to _store_ data in a memory location. When a variable is declared, a memory location is reserved. When a variable is assigned to a value (data), the memory space will be filled with that data. To declare a variable, we use _var_, _let_, or _const_ keywords.
540540

541-
For a variable that changes at a different time, we use _let_. If the data does not change at all, we use _const_. For example, PI, country name, gravity do no change, and we can use _const_. We will not use var in this challenge and I don't recommend you to use it. It is error prone way of declaring variable it has lots of leak. We will talk more about var, let, and const in detail in other sections (scope). For now, the above explanation is enough.
541+
For a variable that changes at a different time, we use _let_. If the data does not change at all, we use _const_. For example, PI, country name, gravity do not change, and we can use _const_. We will not use var in this challenge and I don't recommend you to use it. It is error prone way of declaring variable it has lots of leak. We will talk more about var, let, and const in detail in other sections (scope). For now, the above explanation is enough.
542542

543543
A valid JavaScript variable name must follow the following rules:
544544

@@ -571,7 +571,7 @@ year2020
571571
year_2020
572572
```
573573

574-
The first and second variables on the list follows the camelCase convention of declaring in JavaScrip. In this material, we will use camelCase variables.
574+
The first and second variables on the list follows the camelCase convention of declaring in JavaScript. In this material, we will use camelCase variables.
575575

576576
Example of invalid variables:
577577

@@ -603,16 +603,15 @@ console.log(firstName, lastName, country, city, age, isMarried)
603603
```
604604

605605
```sh
606-
Asabeneh Yetayeh Finland Helsinki 100 True
606+
Asabeneh Yetayeh Finland Helsinki 100 true
607607
```
608608

609609
```js
610610
// Declaring variables with number values
611611
let age = 100 // age in years
612612
const gravity = 9.81 // earth gravity in m/s2
613-
const boilingPoint = 100 // water boiling point, temperature in oC
613+
const boilingPoint = 100 // water boiling point, temperature in °C
614614
const PI = 3.14 // geometrical constant
615-
616615
console.log(gravity, boilingPoint, PI)
617616
```
618617

@@ -623,8 +622,8 @@ console.log(gravity, boilingPoint, PI)
623622
```js
624623
// Variables can also be declaring in one line separated by comma
625624
let name = 'Asabeneh', // name of a person
626-
job = 'teacher',
627-
live = 'Finland'
625+
job = 'teacher',
626+
live = 'Finland'
628627
console.log(name, job, live)
629628
```
630629

0 commit comments

Comments
 (0)