Skip to content

Commit 95c76f7

Browse files
authored
Merge branch 'master' into day2up
2 parents d5ecfce + f6b0536 commit 95c76f7

185 files changed

Lines changed: 4777 additions & 65 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

02_Day/02_day_data_types.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,9 @@ console.log(string.charCodeAt(lastIndex)) // t ASCII is 116
626626
627627
```
628628
629-
1. *indexOf()*: Takes a substring, and if the substring exists, it returns the first position of the substring. However if the substring does not exist, it returns -1
629+
630+
13. *indexOf()*: Takes a substring and if the substring exists in a string it returns the first position of the substring if does not exist it returns -1
631+
630632
631633
```js
632634
string.indexOf(substring)
@@ -644,7 +646,8 @@ console.log(string.indexOf('Script')) //15
644646
console.log(string.indexOf('script')) // -1
645647
```
646648
647-
1. *lastIndexOf()*: Takes a substring, and if the substring exists, it returns the last position of the substring. However if it does not exist, it returns -1
649+
14. *lastIndexOf()*: Takes a substring and if the substring exists in a string it returns the last position of the substring if it does not exist it returns -1
650+
648651
649652
```js
650653
//syntax
@@ -694,7 +697,7 @@ console.log(country.startsWith('fin')) // false
694697
console.log(country.startsWith('land')) // false
695698
```
696699
697-
17. *endsWith*: it takes a substring as an argument and it checks if the string starts with that specified substring. It returns a boolean(true or false).
700+
17. *endsWith*: it takes a substring as an argument and it checks if the string ends with that specified substring. It returns a boolean(true or false).
698701
699702
```js
700703
string.endsWith(substring)
@@ -928,6 +931,7 @@ console.log(numInt) // 9
928931
The quote 'There is no exercise better for the heart than reaching down and lifting people up.' by John Holmes teaches us to help one another.
929932
```
930933
934+
931935
2. Using console.log() print out the following quote by Mother Teresa:
932936
933937
```sh
@@ -951,7 +955,6 @@ console.log(numInt) // 9
951955
4 1 4 16 64
952956
5 1 5 25 125
953957
```
954-
955958
12. Use __substr__ to slice out the phrase __because because because__ from the following sentence:__'You cannot end a sentence with because because because is a conjunction'__
956959
957960
### Exercises: Level 3

02_Day/string_methods/match.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ console.log(string.match(pattern)) // ["love", "love", "love"]
1515
// Let us extract numbers from text using regular expression. This is not regular expression section, no panic.
1616

1717
let txt = 'In 2019, I run 30 Days of Pyhton. Now, in 2020 I super exited to start this challenge'
18-
let regEx = /\d+/ // d with escape character means d not a normal d instead acts a digit
18+
let regEx = /\d/g // d with escape character means d not a normal d instead acts a digit
1919
// + means one or more digit numbers,
2020
// if there is g after that it means global, search everywhere.
21-
console.log(text.match(regEx)) // ["2", "0", "1", "9", "3", "0", "2", "0", "2", "0"]
22-
console.log(text.match(/\d+/g)) // ["2019", "30", "2020"]
21+
console.log(txt.match(regEx)) // ["2", "0", "1", "9", "3", "0", "2", "0", "2", "0"]
22+
console.log(txt.match(/\d+/g)) // ["2019", "30", "2020"]

07_Day/07_day_functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ functionName(parm1,parm2,parm3,...) // during calling or invoking three argument
203203
function sumArrayValues(arr) {
204204
let sum = 0;
205205
for (let i = 0; i < arr.length; i++) {
206-
sum = sum + numbers[i];
206+
sum = sum + arr[i];
207207
}
208208
return sum;
209209
}

26_Day/26_day_dom_day_6.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
</div>
1616

17-
[<< Day 24](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/24_Day/24_day_dom_day_4.md) | [Day 27 >>](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/27_Day/27_day_dom_day_7.md)
17+
[<< Day 25](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/25_Day/25_day_dom_day_5.md) | [Day 27 >>](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/27_Day/27_day_dom_day_7.md)
1818

1919
![Thirty Days Of JavaScript](../images/banners/day_1_26.png)
2020

28_Day/28_day_dom_day_8.md

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

1515
</div>
1616

17-
[<< Day 27](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master27_Day27_day_dom_day_7.md) | [Day 29>>](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/29_Day/29_day_dom_day_9.md)
17+
[<< Day 27](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/27_Day/27_day_dom_day_7.md) | [Day 29>>](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/29_Day/29_day_dom_day_9.md)
1818

1919
![Thirty Days Of JavaScript](../images/banners/day_1_28.png)
2020

@@ -34,4 +34,4 @@
3434

3535
🎉 CONGRATULATIONS ! 🎉
3636

37-
[<< Day 27](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master27_Day27_day_dom_day_7.md) | [Day 29>>](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/29_Day/29_day_dom_day_9.md)
37+
[<< Day 27](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/27_Day/27_day_dom_day_7.md) | [Day 29>>](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/29_Day/29_day_dom_day_9.md)

29_Day/29_day_dom_day_9.md

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

1515
</div>
1616

17-
[<< Day 27](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master27_Day27_day_dom_day_7.md) | [Day 29>>](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/29_Day/29_day_dom_day_9.md)
17+
[<< Day 28](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/28_Day/28_day_dom_day_8.md) | [Day 30>>](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/30_Day/30_day_dom_day_10.md)
1818

1919
![Thirty Days Of JavaScript](../images/banners/day_1_29.png)
2020

@@ -41,4 +41,4 @@
4141

4242
🎉 CONGRATULATIONS ! 🎉
4343

44-
[<< Day 28](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master28_Day28_day_dom_day_8.md) | [Day 30>>](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/30_Day/30_day_dom_day_10.md)
44+
[<< Day 28](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/28_Day/28_day_dom_day_8.md) | [Day 30>>](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/30_Day/30_day_dom_day_10.md)

30_Day/30_day_dom_day_10.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@
4949

5050
~![Congratulations](./../images/projects/congratulations.gif)
5151

52-
[<< Day 29](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master29_Day29_day_dom_day_9.md) | [Day 30>>](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/30_Day/30_day_dom_day_10.md)
52+
[<< Day 29](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/29_Day/29_day_dom_day_9.md) | [Day 30>>](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/30_Day/30_day_dom_day_10.md)

0 commit comments

Comments
 (0)