Skip to content

Commit 7ccf2de

Browse files
committed
some fixes
1 parent 9fc1c2a commit 7ccf2de

File tree

11 files changed

+131
-133
lines changed

11 files changed

+131
-133
lines changed

01_Day_Introduction/01_day_starter/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ <h2>Introduction</h2>
1111
<button onclick="alert('Welcome to 30DaysOfJavaScript!');">Click Me</button>
1212
<script src="./helloworld.js"></script>
1313
<script src="./introduction.js"></script>
14-
<script src="./varaible.js"></script>
14+
<script src="./variable.js"></script>
1515
<script src="./main.js"></script>
1616

1717
</body>

02_Day_Data_types/02_day_data_types.md

+25-25
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,30 @@
1919
![Thirty Days Of JavaScript](../images/banners/day_1_2.png)
2020

2121
- [📔 Day 2](#-day-2)
22-
- [Data Types](#data-types)
23-
- [Primitive Data Types](#primitive-data-types)
24-
- [Non-Primitive Data Types](#non-primitive-data-types)
25-
- [Numbers](#numbers)
26-
- [Declaring Number Data Types](#declaring-number-data-types)
27-
- [Math Object](#math-object)
28-
- [Random Number Generator](#random-number-generator)
29-
- [Strings](#strings)
30-
- [String Concatenation](#string-concatenation)
31-
- [Concatenating Using Addition Operator](#concatenating-using-addition-operator)
32-
- [Long Literal Strings](#long-literal-strings)
33-
- [Escape Sequences in Strings](#escape-sequences-in-strings)
34-
- [Template Literals (Template Strings)](#template-literals-template-strings)
35-
- [String Methods](#string-methods)
36-
- [Checking Data Types and Casting](#checking-data-types-and-casting)
37-
- [Checking Data Types](#checking-data-types)
38-
- [Changing Data Type (Casting)](#changing-data-type-casting)
39-
- [String to Int](#string-to-int)
40-
- [String to Float](#string-to-float)
41-
- [Float to Int](#float-to-int)
42-
- [💻 Day 2: Exercises](#-day-2-exercises)
43-
- [Exercise: Level 1](#exercise-level-1)
44-
- [Exercise: Level 2](#exercise-level-2)
45-
- [Exercises: Level 3](#exercises-level-3)
22+
- [Data Types](#data-types)
23+
- [Primitive Data Types](#primitive-data-types)
24+
- [Non-Primitive Data Types](#non-primitive-data-types)
25+
- [Numbers](#numbers)
26+
- [Declaring Number Data Types](#declaring-number-data-types)
27+
- [Math Object](#math-object)
28+
- [Random Number Generator](#random-number-generator)
29+
- [Strings](#strings)
30+
- [String Concatenation](#string-concatenation)
31+
- [Concatenating Using Addition Operator](#concatenating-using-addition-operator)
32+
- [Long Literal Strings](#long-literal-strings)
33+
- [Escape Sequences in Strings](#escape-sequences-in-strings)
34+
- [Template Literals (Template Strings)](#template-literals-template-strings)
35+
- [String Methods](#string-methods)
36+
- [Checking Data Types and Casting](#checking-data-types-and-casting)
37+
- [Checking Data Types](#checking-data-types)
38+
- [Changing Data Type (Casting)](#changing-data-type-casting)
39+
- [String to Int](#string-to-int)
40+
- [String to Float](#string-to-float)
41+
- [Float to Int](#float-to-int)
42+
- [💻 Day 2: Exercises](#-day-2-exercises)
43+
- [Exercise: Level 1](#exercise-level-1)
44+
- [Exercise: Level 2](#exercise-level-2)
45+
- [Exercises: Level 3](#exercises-level-3)
4646

4747
# 📔 Day 2
4848

@@ -876,7 +876,7 @@ console.log(numFloat) // 9.81
876876
let num = '9.81'
877877
let numFloat = +num
878878
879-
console.log(numInt) // 9.81
879+
console.log(numFloat) // 9.81
880880
```
881881
882882
#### Float to Int

03_Day_Booleans_operators_date/03_booleans_operators_date.md

+35-35
Original file line numberDiff line numberDiff line change
@@ -18,38 +18,38 @@
1818
![Thirty Days Of JavaScript](../images/banners/day_1_3.png)
1919

2020
- [📔 Day 3](#-day-3)
21-
- [Booleans](#booleans)
22-
- [Truthy values](#truthy-values)
23-
- [Falsy values](#falsy-values)
24-
- [Undefined](#undefined)
25-
- [Null](#null)
26-
- [Operators](#operators)
27-
- [Assignment operators](#assignment-operators)
28-
- [Arithmetic Operators](#arithmetic-operators)
29-
- [Comparison Operators](#comparison-operators)
30-
- [Logical Operators](#logical-operators)
31-
- [Increment Operator](#increment-operator)
32-
- [Decrement Operator](#decrement-operator)
33-
- [Ternary Operators](#ternary-operators)
34-
- [Operator Precendence](#operator-precendence)
35-
- [Window Methods](#window-methods)
36-
- [Window alert() method](#window-alert-method)
37-
- [Window prompt() method](#window-prompt-method)
38-
- [Window confirm() method](#window-confirm-method)
39-
- [Date Object](#date-object)
40-
- [Creating a time object](#creating-a-time-object)
41-
- [Getting full year](#getting-full-year)
42-
- [Getting month](#getting-month)
43-
- [Getting date](#getting-date)
44-
- [Getting day](#getting-day)
45-
- [Getting hours](#getting-hours)
46-
- [Getting minutes](#getting-minutes)
47-
- [Getting seconds](#getting-seconds)
48-
- [Getting time](#getting-time)
49-
- [💻 Day 3: Exercises](#-day-3-exercises)
50-
- [Exercises: Level 1](#exercises-level-1)
51-
- [Exercises: Level 2](#exercises-level-2)
52-
- [Exercises: Level 3](#exercises-level-3)
21+
- [Booleans](#booleans)
22+
- [Truthy values](#truthy-values)
23+
- [Falsy values](#falsy-values)
24+
- [Undefined](#undefined)
25+
- [Null](#null)
26+
- [Operators](#operators)
27+
- [Assignment operators](#assignment-operators)
28+
- [Arithmetic Operators](#arithmetic-operators)
29+
- [Comparison Operators](#comparison-operators)
30+
- [Logical Operators](#logical-operators)
31+
- [Increment Operator](#increment-operator)
32+
- [Decrement Operator](#decrement-operator)
33+
- [Ternary Operators](#ternary-operators)
34+
- [Operator Precendence](#operator-precendence)
35+
- [Window Methods](#window-methods)
36+
- [Window alert() method](#window-alert-method)
37+
- [Window prompt() method](#window-prompt-method)
38+
- [Window confirm() method](#window-confirm-method)
39+
- [Date Object](#date-object)
40+
- [Creating a time object](#creating-a-time-object)
41+
- [Getting full year](#getting-full-year)
42+
- [Getting month](#getting-month)
43+
- [Getting date](#getting-date)
44+
- [Getting day](#getting-day)
45+
- [Getting hours](#getting-hours)
46+
- [Getting minutes](#getting-minutes)
47+
- [Getting seconds](#getting-seconds)
48+
- [Getting time](#getting-time)
49+
- [💻 Day 3: Exercises](#-day-3-exercises)
50+
- [Exercises: Level 1](#exercises-level-1)
51+
- [Exercises: Level 2](#exercises-level-2)
52+
- [Exercises: Level 3](#exercises-level-3)
5353

5454
# 📔 Day 3
5555

@@ -218,7 +218,7 @@ console.log('python'.length > 'dragon'.length) // false
218218
```
219219

220220
Try to understand the above comparisons with some logic. Remembering without any logic might be difficult.
221-
JavaScript is some how a wired kind of programming language. JavaScript code run and give you a result but unless you are good at it may not be the desired result.
221+
JavaScript is somehow a wired kind of programming language. JavaScript code run and give you a result but unless you are good at it may not be the desired result.
222222

223223
As rule of thumb, if a value is not true with == it will not be equal with ===. Using === is safer than using ==. The following [link](https://dorey.github.io/JavaScript-Equality-Table/) has an exhaustive list of comparison of data types.
224224

@@ -254,7 +254,7 @@ let isMarried = !false // true
254254

255255
### Increment Operator
256256

257-
In JavaScrip we use the increment operator to increase a value stored in a variable. The increment could be pre or post increment. Let us see each of them:
257+
In JavaScript we use the increment operator to increase a value stored in a variable. The increment could be pre or post increment. Let us see each of them:
258258

259259
1. Pre-increment
260260

@@ -276,7 +276,7 @@ We use most of the time post-increment. At least you should remember how to use
276276

277277
### Decrement Operator
278278

279-
In JavaScrip we use the decrement operator to decrease a value stored in a variable. The decrement could be pre or post decrement. Let us see each of them:
279+
In JavaScript we use the decrement operator to decrease a value stored in a variable. The decrement could be pre or post decrement. Let us see each of them:
280280

281281
1. Pre-decrement
282282

04_Day_Conditionals/04_day_conditionals.md

+12-11
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
![Thirty Days Of JavaScript](../images/banners/day_1_4.png)
1919

2020
- [📔 Day 4](#-day-4)
21-
- [Conditionals](#conditionals)
22-
- [If](#if)
23-
- [If Else](#if-else)
24-
- [If Else if Else](#if-else-if-else)
25-
- [Switch](#switch)
26-
- [Ternary Operators](#ternary-operators)
27-
- [💻 Exercises](#-exercises)
28-
- [Exercises: Level 1](#exercises-level-1)
29-
- [Exercises: Level 2](#exercises-level-2)
30-
- [Exercises: Level 3](#exercises-level-3)
21+
- [Conditionals](#conditionals)
22+
- [If](#if)
23+
- [If Else](#if-else)
24+
- [If Else if Else](#if--else-if-else)
25+
- [Switch](#switch)
26+
- [Ternary Operators](#ternary-operators)
27+
- [💻 Exercises](#-exercises)
28+
- [Exercises: Level 1](#exercises-level-1)
29+
- [Exercises: Level 2](#exercises-level-2)
30+
- [Exercises: Level 3](#exercises-level-3)
3131

3232
# 📔 Day 4
3333

@@ -189,7 +189,8 @@ switch(caseValue){
189189
// code
190190
break
191191
case 3:
192-
// code
192+
// code
193+
break
193194
default:
194195
// code
195196
}

09_Day_Higher_order_functions/09_day_higher_order_functions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ _every_: Check if all the elements are similar in one aspect. It returns boolean
390390
const names = ['Asabeneh', 'Mathias', 'Elias', 'Brook']
391391
const areAllStr = names.every((name) => typeof name === 'string') // Are all strings?
392392
393-
console.log(arrAllStr)
393+
console.log(areAllStr)
394394
```
395395
396396
```sh

12_Day_Regular_expressions/12_day_regular_expressions.md

+28-31
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,29 @@
1818
![Thirty Days Of JavaScript](../images/banners/day_1_12.png)
1919

2020
- [📘 Day 12](#-day-12)
21-
- [Regular Expressions](#regular-expressions)
22-
- [RegExp parameters](#regexp-parameters)
23-
- [Pattern](#pattern)
24-
- [Flags](#flags)
25-
- [Creating a pattern with RegExp Constructor](#creating-a-pattern-with-regexp-constructor)
26-
- [Creating a pattern without RegExp Constructor](#creating-a-pattern-without-regexp-constructor)
27-
- [RegExpp Object Methods](#regexpp-object-methods)
28-
- [Testing for a match](#testing-for-a-match)
29-
- [Array containing all of the match](#array-containing-all-of-the-match)
30-
- [Replacing a substring](#replacing-a-substring)
31-
- [Square Bracket](#square-bracket)
32-
- [Escape character(\\) in RegExp](#escape-character-in-regexp)
33-
- [One or more times(+)](#one-or-more-times)
34-
- [Period(.)](#period)
35-
- [Zero or more times(*)](#zero-or-more-times)
36-
- [Zero or one times(?)](#zero-or-one-times)
37-
- [Quantifier in RegExp](#quantifier-in-regexp)
38-
- [Cart ^](#cart-)
39-
- [Exact match](#exact-match)
40-
- [💻 Exercises](#-exercises)
41-
- [Exercises: Level 1](#exercises-level-1)
42-
- [Exercises: Level 2](#exercises-level-2)
43-
- [Exercises: Level 3](#exercises-level-3)
21+
- [Regular Expressions](#regular-expressions)
22+
- [RegExp parameters](#regexp-parameters)
23+
- [Pattern](#pattern)
24+
- [Flags](#flags)
25+
- [Creating a pattern with RegExp Constructor](#creating-a-pattern-with-regexp-constructor)
26+
- [Creating a pattern without RegExp Constructor](#creating-a-pattern-without-regexp-constructor)
27+
- [RegExpp Object Methods](#regexpp-object-methods)
28+
- [Testing for a match](#testing-for--a-match)
29+
- [Array containing all of the match](#array-containing-all-of-the-match)
30+
- [Replacing a substring](#replacing-a-substring)
31+
- [Square Bracket](#square-bracket)
32+
- [Escape character(\\) in RegExp](#escape-character-in-regexp)
33+
- [One or more times(+)](#one-or-more-times)
34+
- [Period(.)](#period)
35+
- [Zero or more times(*)](#zero-or-more-times)
36+
- [Zero or one times(?)](#zero-or-one-times)
37+
- [Quantifier in RegExp](#quantifier-in-regexp)
38+
- [Cart ^](#cart-)
39+
- [Exact match](#exact-match)
40+
- [💻 Exercises](#-exercises)
41+
- [Exercises: Level 1](#exercises-level-1)
42+
- [Exercises: Level 2](#exercises-level-2)
43+
- [Exercises: Level 3](#exercises-level-3)
4444

4545
# 📘 Day 12
4646

@@ -503,22 +503,19 @@ distance = 12
503503

504504
```js
505505
sentence = `%I $am@% a %tea@cher%, &and& I lo%#ve %tea@ching%;. There $is nothing; &as& mo@re rewarding as educa@ting &and& @emp%o@wering peo@ple. ;I found tea@ching m%o@re interesting tha@n any other %jo@bs. %Do@es thi%s mo@tivate yo@u to be a tea@cher!?`
506-
507-
console.log(cleanText(sentence))
506+
console.log(cleanText(sentence))
508507
```
509508
510509
```sh
511510
I am a teacher and I love teaching There is nothing as more rewarding as educating and empowering people I found teaching more interesting than any other jobs Does this motivate you to be a teacher
512511
```
513-
1. Write a function which find the most frequent words. After cleaning, count three most frequent words in the string.
512+
2. Write a function which find the most frequent words. After cleaning, count three most frequent words in the string.
514513
515-
```js
514+
```js
516515
console.log(mostFrequentWords(cleanedText))
517516
[{word:'I', count:3}, {word:'teaching', count:2}, {word:'teacher', count:2}]
518-
```
519-
517+
```
520518
521519
🎉 CONGRATULATIONS ! 🎉
522520
523-
524-
[<< Day 11](../11_Day_Destructuring_and_spreading/11_day_destructuring_and_spreading.md) | [Day 13>>](../13_Day_Console_object_methods/13_day_console_object_methods.md)
521+
[<< Day 11](../11_Day_Destructuring_and_spreading/11_day_destructuring_and_spreading.md) | [Day 13 >>](../13_Day_Console_object_methods/13_day_console_object_methods.md)

15_Day_Classes/15_day_classes.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@
1919
![Thirty Days Of JavaScript](../images/banners/day_1_15.png)
2020

2121
- [Day 15](#day-15)
22-
- [Classes](#classes)
23-
- [Defining a classes](#defining-a-classes)
24-
- [Class Instantiation](#class-instantiation)
25-
- [Class Constructor](#class-constructor)
26-
- [Default values with constructor](#default-values-with-constructor)
27-
- [Class methods](#class-methods)
28-
- [Properties with initial value](#properties-with-initial-value)
29-
- [getter](#getter)
30-
- [setter](#setter)
31-
- [Static method](#static-method)
32-
- [Inheritance](#inheritance)
33-
- [Overriding methods](#overriding-methods)
34-
- [Exercises](#exercises)
35-
- [Exercises Level 1](#exercises-level-1)
36-
- [Exercises Level 2](#exercises-level-2)
37-
- [Exercises Level 3](#exercises-level-3)
22+
- [Classes](#classes)
23+
- [Defining a classes](#defining-a-classes)
24+
- [Class Instantiation](#class-instantiation)
25+
- [Class Constructor](#class-constructor)
26+
- [Default values with constructor](#default-values-with-constructor)
27+
- [Class methods](#class-methods)
28+
- [Properties with initial value](#properties-with-initial-value)
29+
- [getter](#getter)
30+
- [setter](#setter)
31+
- [Static method](#static-method)
32+
- [Inheritance](#inheritance)
33+
- [Overriding methods](#overriding-methods)
34+
- [Exercises](#exercises)
35+
- [Exercises Level 1](#exercises-level-1)
36+
- [Exercises Level 2](#exercises-level-2)
37+
- [Exercises Level 3](#exercises-level-3)
3838

3939
# Day 15
4040

@@ -111,7 +111,7 @@ console.log(person)
111111
```
112112

113113
```sh
114-
Person {firstName: undefined, lastName}
114+
Person {firstName: undefined, lastName:undefined}
115115
```
116116

117117
All the keys of the object are undefined. When ever we instantiate we should pass the value of the properties. Let us pass value at this time when we instantiate the class.

18_Day_Promises/18_day_promises.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
![Thirty Days Of JavaScript](../images/banners/day_1_18.png)
2020

2121
- [Day 18](#day-18)
22-
- [Promise](#promise)
23-
- [Callbacks](#callbacks)
24-
- [Promise constructor](#promise-constructor)
25-
- [Fetch API](#fetch-api)
26-
- [Async and Await](#async-and-await)
27-
- [Exercises](#exercises)
28-
- [Exercises: Level 1](#exercises-level-1)
29-
- [Exercises: Level 2](#exercises-level-2)
30-
- [Exercises: Level 3](#exercises-level-3)
22+
- [Promise](#promise)
23+
- [Callbacks](#callbacks)
24+
- [Promise constructor](#promise-constructor)
25+
- [Fetch API](#fetch-api)
26+
- [Async and Await](#async-and-await)
27+
- [Exercises](#exercises)
28+
- [Exercises: Level 1](#exercises-level-1)
29+
- [Exercises: Level 2](#exercises-level-2)
30+
- [Exercises: Level 3](#exercises-level-3)
3131

3232
# Day 18
3333

@@ -147,7 +147,7 @@ Let us another example when the promise is settled with reject.
147147
const doPromise = new Promise((resolve, reject) => {
148148
setTimeout(() => {
149149
const skills = ['HTML', 'CSS', 'JS']
150-
if (skills.icludes('Node')) {
150+
if (skills.includes('Node')) {
151151
resolve('fullstack developer')
152152
} else {
153153
reject('Something wrong has happened')

21_Day_DOM/21_day_dom.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ We can access already created element or elements using JavaScript. To access or
7474

7575
#### Getting elements by tag name
7676

77-
**_getElementsByTagName()_**:takes a take name as a string parameter and this method returns an HTMLCollection object. An HTMLCollection is an array like object of HTML elements. The length property provides the size of the collection. Whenever we use this method we access the individual elements using index or after loop through each individual items. An HTMLCollection does not support all array methods therefore we should use regular for loop instead of forEach.
77+
**_getElementsByTagName()_**:takes a tag name as a string parameter and this method returns an HTMLCollection object. An HTMLCollection is an array like object of HTML elements. The length property provides the size of the collection. Whenever we use this method we access the individual elements using index or after loop through each individual items. An HTMLCollection does not support all array methods therefore we should use regular for loop instead of forEach.
7878

7979
```js
8080
// syntax

readMe.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ This is a multiline comment
240240

241241
##### Syntax
242242

243-
Programming languages are similar to human languages. English or many other language uses words, phrases, sentences,compound sentences and other more to convey a meaningful message. The English meaning of syntax is _the arrangement of words and phrases to create well-formed sentences in a language_. The technical definition of syntax is the structure of statements in a computer language.Programming languages have syntax. JavaScript is a programming language and like other programming languages it has its own syntax. If we do not write a syntax that JavaScript understands, it will raise different types of errors. We will explore different kinds of JavaScript errors later. For now, let us see syntax errors.
243+
Programming languages are similar to human languages. English or many other language uses words, phrases, sentences, compound sentences and other more to convey a meaningful message. The English meaning of syntax is _the arrangement of words and phrases to create well-formed sentences in a language_. The technical definition of syntax is the structure of statements in a computer language. Programming languages have syntax. JavaScript is a programming language and like other programming languages it has its own syntax. If we do not write a syntax that JavaScript understands, it will raise different types of errors. We will explore different kinds of JavaScript errors later. For now, let us see syntax errors.
244244

245245
![Error](images/raising_syntax_error.png)
246246

0 commit comments

Comments
 (0)