diff --git a/Exercise-Solutions/01_day_introdiction.md b/Exercise-Solutions/days/01_day_introdiction.md
similarity index 63%
rename from Exercise-Solutions/01_day_introdiction.md
rename to Exercise-Solutions/days/01_day_introdiction.md
index 75e4fda..18cedeb 100644
--- a/Exercise-Solutions/01_day_introdiction.md
+++ b/Exercise-Solutions/days/01_day_introdiction.md
@@ -1,30 +1,19 @@
-# Day 1 - Introduction
+# Day 1 - Introdiction
+
+## [Exercise:Solutions](#exercise-solutions)
-## [Exercise Level 1](#exercise-level-1)
-### [< Home >](../README.md) | [Day 2 >>](./02_day_datatype.md)
-### Exercise Level 1
+- ### [Exercise Level 1](#exercise-level-1)
+
+ #### [Home](../README.md) | [Day 2 >>](./02_day_datatype.md)
-1. Write a single line comment which says, _comments can make code readable_
-2. Write another single comment which says, _Welcome to 30DaysOfJavaScript_
-3. Write a multiline comment which says, _comments can make code readable, easy to reuse_
- _and informative_
-4. Create a variable.js file and declare variables and assign string, boolean, undefined and null data types
-5. Create datatypes.js file and use the JavaScript **_typeof_** operator to check different data types. Check the data type of each variable
-6. Declare four variables without assigning values
-7. Declare four variables with assigned values
-8. Declare variables to store your first name, last name, marital status, country and age in multiple lines
-9. Declare variables to store your first name, last name, marital status, country and age in a single line
-10. Declare two variables _myAge_ and _yourAge_ and assign them initial values and log to the browser console.
-```sh
-I am 25 years old.
-You are 30 years old.
-```
-### Exercise Level 1
+## Exercise Solutions
+
+### Exercise Level 1
1. Write a single line comment which says, comments can make code readable
@@ -117,5 +106,4 @@ let yourAge = 22
console.log("I am " + " " + myAge + " " + "years old.") // I am 25 years old.
console.log("You are" + " " + yourAge + " " + "years old.") // You are 22 years old.
```
-
-### [< Home >](../README.md) | [Day 2 >>](./02_day_datatype.md)
+ #### [Home](../README.md) | [Day 2 >>](./02_day_datatype.md)
\ No newline at end of file
diff --git a/Exercise-Solutions/02_day_datatype.md b/Exercise-Solutions/days/02_day_datatype.md
similarity index 63%
rename from Exercise-Solutions/02_day_datatype.md
rename to Exercise-Solutions/days/02_day_datatype.md
index a62672e..f1d2b02 100644
--- a/Exercise-Solutions/02_day_datatype.md
+++ b/Exercise-Solutions/days/02_day_datatype.md
@@ -1,87 +1,18 @@
+# Day 2 - Datatype
+
-# Exercise Day 2 - DataType
-
-## [Home](../README.md) | [<< Day 1](./01_day_introdiction.md) | [Day 3 >>](./03_day_operators.md)
-
-### [Exercise:Level 1](#exercise-level-1)
-
-1. Declare a variable named challenge and assign it to an initial value **'30 Days Of JavaScript'**.
-2. Print the string on the browser console using __console.log()__
-3. Print the __length__ of the string on the browser console using _console.log()_
-4. Change all the string characters to capital letters using __toUpperCase()__ method
-5. Change all the string characters to lowercase letters using __toLowerCase()__ method
-6. Cut (slice) out the first word of the string using __substr()__ or __substring()__ method
-7. Slice out the phrase *Days Of JavaScript* from *30 Days Of JavaScript*.
-8. Check if the string contains a word __Script__ using __includes()__ method
-9. Split the __string__ into an __array__ using __split()__ method
-10. Split the string 30 Days Of JavaScript at the space using __split()__ method
-11. 'Facebook, Google, Microsoft, Apple, IBM, Oracle, Amazon' __split__ the string at the comma and change it to an array.
-12. Change 30 Days Of JavaScript to 30 Days Of Python using __replace()__ method.
-13. What is character at index 15 in '30 Days Of JavaScript' string? Use __charAt()__ method.
-14. What is the character code of J in '30 Days Of JavaScript' string using __charCodeAt()__
-15. Use __indexOf__ to determine the position of the first occurrence of __a__ in 30 Days Of JavaScript
-16. Use __lastIndexOf__ to determine the position of the last occurrence of __a__ in 30 Days Of JavaScript.
-17. Use __indexOf__ to find the position of the first occurrence of the word __because__ in the following sentence:__'You cannot end a sentence with because because because is a conjunction'__
-18. Use __lastIndexOf__ to find the position of the last occurrence of the word __because__ in the following sentence:__'You cannot end a sentence with because because because is a conjunction'__
-19. Use __search__ to find the position of the first occurrence of the word __because__ in the following sentence:__'You cannot end a sentence with because because because is a conjunction'__
-20. Use __trim()__ to remove any trailing whitespace at the beginning and the end of a string.E.g ' 30 Days Of JavaScript '.
-21. Use __startsWith()__ method with the string *30 Days Of JavaScript* and make the result true
-22. Use __endsWith()__ method with the string *30 Days Of JavaScript* and make the result true
-23. Use __match()__ method to find all the __a__’s in 30 Days Of JavaScript
-24. Use __concat()__ and merge '30 Days of' and 'JavaScript' to a single string, '30 Days Of JavaScript'
-25. Use __repeat()__ method to print 30 Days Of JavaScript 2 times
-
-
-### [Exercise:Level 2](#exercise-level-2)
+## [Exercise:Solutions](#exercise-solutions)
-1. Using console.log() print out the following statement:
-
- ```sh
- 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.
- ```
-
-2. Using console.log() print out the following quote by Mother Teresa:
-
- ```sh
- "Love is not patronizing and charity isn't about pity, it is about love. Charity and love are the same -- with charity you give love, so don't just give money but reach out your hand instead."
- ```
-
-3. Check if typeof '10' is exactly equal to 10. If not make it exactly equal.
-4. Check if parseFloat('9.8') is equal to 10 if not make it exactly equal with 10.
-5. Check if 'on' is found in both python and jargon
-6. _I hope this course is not full of jargon_. Check if _jargon_ is in the sentence.
-7. Generate a random number between 0 and 100 inclusively.
-8. Generate a random number between 50 and 100 inclusively.
-9. Generate a random number between 0 and 255 inclusively.
-10. Access the 'JavaScript' string characters using a random number.
-11. Use console.log() and escape characters to print the following pattern.
-
- ```js
- 1 1 1 1 1
- 2 1 2 4 8
- 3 1 3 9 27
- 4 1 4 16 64
- 5 1 5 25 125
- ```
-
-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'__
+- ### [Exercise:Level 1](#exercise-level-1)
+- ### [Exercise:Level 2](#exercise-level-2)
+- ### [Exercise:Level 3](#exercise-level-3)
-### [Exercise:Level 3](#exercise-level-3)
+ #### [Home](../README.md) | [<< Day 1](./01_day_introdiction.md) | [Day 3 >>](./03_day_operators.md)
-1. 'Love is the best thing in this world. Some found their love and some are still looking for their love.' Count the number of word __love__ in this sentence.
-2. Use __match()__ to count the number of all __because__ in the following sentence:__'You cannot end a sentence with because because because is a conjunction'__
-3. Clean the following text and find the most frequent word (hint, use replace and regular expressions).
-
- ```js
- const sentence = '%I $am@% a %tea@cher%, &and& I lo%#ve %te@a@ching%;. The@re $is no@th@ing; &as& mo@re rewarding as educa@ting &and& @emp%o@weri@ng peo@ple. ;I found tea@ching m%o@re interesting tha@n any ot#her %jo@bs. %Do@es thi%s mo@tiv#ate yo@u to be a tea@cher!? %Th#is 30#Days&OfJavaScript &is al@so $the $resu@lt of &love& of tea&ching'
- ```
+## Exercise Solutions
-4. Calculate the total annual income of the person by extracting the numbers from the following text. 'He earns 5000 euro from salary per month, 10000 euro annual bonus, 15000 euro online courses per month.'
-
-
-
-## Exercise Level 1
+### Exercise Level 1
1. Declare a variable named challenge and assign it to an initial value '30 Days Of JavaScript'.
```js
@@ -452,9 +383,7 @@ console.log(`Annual income is ${montlySalary*12 +
bonus + montlyCourses *12} euro `)
```
-
-## [Home](../README.md) | [<< Day 1](./01_day_introdiction.md) | [Day 3 >>](./03_day_operators.md)
-
+ #### [Home](../README.md) | [<< Day 1](./01_day_introdiction.md) | [Day 3 >>](./03_day_operators.md)
diff --git a/Exercise-Solutions/03_day_operators.md b/Exercise-Solutions/days/03_day_operators.md
similarity index 64%
rename from Exercise-Solutions/03_day_operators.md
rename to Exercise-Solutions/days/03_day_operators.md
index 1580522..60c7ccc 100644
--- a/Exercise-Solutions/03_day_operators.md
+++ b/Exercise-Solutions/days/03_day_operators.md
@@ -1,137 +1,16 @@
# Day 3 - Operators
+
-## [Home](../README.md) | [<< Day 2](./02_day_datatype.md) | [Day 4 >>](./04_day_conditional.md)
+## [Exercise:Solutions](#exercise-solutions)
-### [Exercise:Level 1](#exercise-level-1)
+- ### [Exercise:Level 1](#exercise-level-1)
+- ### [Exercise:Level 2](#exercise-level-2)
+- ### [Exercise:Level 3](#exercise-level-3)
-1. Declare firstName, lastName, country, city, age, isMarried, year variable and assign value to it and use the typeof operator to check different data types.
-2. Check if type of '10' is equal to 10
-3. Check if parseInt('9.8') is equal to 10
-4. Boolean value is either true or false.
- 1. Write three JavaScript statement which provide truthy value.
- 2. Write three JavaScript statement which provide falsy value.
-
-5. Figure out the result of the following comparison expression first without using console.log(). After you decide the result confirm it using console.log()
- 1. 4 > 3
- 2. 4 >= 3
- 3. 4 < 3
- 4. 4 <= 3
- 5. 4 == 4
- 6. 4 === 4
- 7. 4 != 4
- 8. 4 !== 4
- 9. 4 != '4'
- 10. 4 == '4'
- 11. 4 === '4'
- 12. Find the length of python and jargon and make a falsy comparison statement.
-
-6. Figure out the result of the following expressions first without using console.log(). After you decide the result confirm it by using console.log()
- 1. 4 > 3 && 10 < 12
- 2. 4 > 3 && 10 > 12
- 3. 4 > 3 || 10 < 12
- 4. 4 > 3 || 10 > 12
- 5. !(4 > 3)
- 6. !(4 < 3)
- 7. !(false)
- 8. !(4 > 3 && 10 < 12)
- 9. !(4 > 3 && 10 > 12)
- 10. !(4 === '4')
- 11. There is no 'on' in both dragon and python
-
-7. Use the Date object to do the following activities
- 1. What is the year today?
- 2. What is the month today as a number?
- 3. What is the date today?
- 4. What is the day today as a number?
- 5. What is the hours now?
- 6. What is the minutes now?
- 7. Find out the numbers of seconds elapsed from January 1, 1970 to now.
-
-### [Exercise:Level 2](#exercise-level-2)
-
-1. Write a script that prompt the user to enter base and height of the triangle and calculate an area of a triangle (area = 0.5 x b x h).
-
- ```sh
- Enter base: 20
- Enter height: 10
- The area of the triangle is 100
- ```
-
-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)
-
- ```sh
- Enter side a: 5
- Enter side b: 4
- Enter side c: 3
- The perimeter of the triangle is 12
- ```
-
-1. Get length and width using prompt and calculate an area of rectangle (area = length x width and the perimeter of rectangle (perimeter = 2 x (length + width))
-1. Get radius using prompt and calculate the area of a circle (area = pi x r x r) and circumference of a circle(c = 2 x pi x r) where pi = 3.14.
-1. Calculate the slope, x-intercept and y-intercept of y = 2x -2
-1. Slope is m = (y2-y1)/(x2-x1). Find the slope between point (2, 2) and point(6,10)
-1. Compare the slope of above two questions.
-1. Calculate the value of y (y = x2 + 6x + 9). Try to use different x values and figure out at what x value y is 0.
-1. Writ a script that prompt a user to enter hours and rate per hour. Calculate pay of the person?
-
- ```sh
- Enter hours: 40
- Enter rate per hour: 28
- Your weekly earning is 1120
- ```
+ #### [Home](../README.md) | [<< Day 2](./02_day_datatype.md) | [Day 4 >>](./04_day_conditional.md)
-1. If the length of your name is greater than 7 say, your name is long else say your name is short.
-1. Compare your first name length and your family name length and you should get this output.
-
- ```js
- let firstName = 'Asabeneh'
- let lastName = 'Yetayeh'
- ```
-
- ```sh
- Your first name, Asabeneh is longer than your family name, Yetayeh
- ```
-
-1. Declare two variables _myAge_ and _yourAge_ and assign them initial values and myAge and yourAge.
-
- ```js
- let myAge = 250
- let yourAge = 25
- ```
-
- ```sh
- I am 225 years older than you.
- ```
-
-1. Using prompt get the year the user was born and if the user is 18 or above allow the user to drive if not tell the user to wait a certain amount of years.
-
- ```sh
-
- Enter birth year: 1995
- You are 25. You are old enough to drive
-
- Enter birth year: 2005
- You are 15. You will be allowed to drive after 3 years.
- ```
-
-1. Write a script that prompt the user to enter number of years. Calculate the number of seconds a person can live. Assume some one lives just hundred years
-
- ```sh
- Enter number of years you live: 100
- You lived 3153600000 seconds.
- ```
-
-1. Create a human readable time format using the Date time object
- 1. YYYY-MM-DD HH:mm
- 2. DD-MM-YYYY HH:mm
- 3. DD/MM/YYYY HH:mm
-
-
-### [Exercise:Level 3](#exercise-level-3)
-
-1. Create a human readable time format using the Date time object. The hour and the minute should be all the time two digits(7 hours should be 07 and 5 minutes should be 05 )
- 1. YYY-MM-DD HH:mm eg. 20120-01-02 07:05
+# Exercise Solutions
## Exercise Level 1
@@ -474,7 +353,6 @@ console.log(`${year}-${mount}-${day} ${hours} : ${minuts}`)
console.log(`${day}-${mount}-${year} ${hours} : ${minuts}`)
console.log(`${year} / ${mount} / ${day} ${hours} : ${minuts}`)
```
-
## Exercise Level 3
1. Create a human readable time format using the Date time object. The hour and the minute should be all the time two digits(7 hours should be 07 and 5 minutes should be 05 )
@@ -494,4 +372,4 @@ console.log(`${day} / ${mount} / ${year} ${hour} : ${minut}`)
```
-## [Home](../README.md) | [<< Day 2](./02_day_datatype.md) | [Day 4 >>](./04_day_conditional.md)
\ No newline at end of file
+ #### [Home](../README.md) | [<< Day 2](./02_day_datatype.md) | [Day 4 >>](./04_day_conditional.md)
diff --git a/Exercise-Solutions/04_day_conditional.md b/Exercise-Solutions/days/04_day_conditional.md
similarity index 65%
rename from Exercise-Solutions/04_day_conditional.md
rename to Exercise-Solutions/days/04_day_conditional.md
index 27f9db4..cb6116e 100644
--- a/Exercise-Solutions/04_day_conditional.md
+++ b/Exercise-Solutions/days/04_day_conditional.md
@@ -1,100 +1,16 @@
-# Exercise Day 2 -Conditionals
+# Day 4 - Conditional
+
-### [Exercises: Level 1](#exercise-level-1)
+## [Exercise:Solutions](#exercise-solutions)
-1. Get user input using prompt(“Enter your age:”). If user is 18 or older , give feedback:'You are old enough to drive' but if not 18 give another feedback stating to wait for the number of years he needs to turn 18.
-
- ```sh
- Enter your age: 30
- You are old enough to drive.
-
- Enter your age:15
- You are left with 3 years to drive.
- ```
-
-1. Compare the values of myAge and yourAge using if … else. Based on the comparison and log the result to console stating who is older (me or you). Use prompt(“Enter your age:”) to get the age as input.
-
- ```sh
- Enter your age: 30
- You are 5 years older than me.
- ```
-
-1. If a is greater than b return 'a is greater than b' else 'a is less than b'. Try to implement it in to ways
-
- - using if else
- - ternary operator.
-
- ```js
- let a = 4
- let b = 3
- ```
-
- ```sh
- 4 is greater than 3
- ```
-
-1. Even numbers are divisible by 2 and the remainder is zero. How do you check, if a number is even or not using JavaScript?
-
- ```sh
- Enter a number: 2
- 2 is an even number
-
- Enter a number: 9
- 9 is is an odd number.
- ```
-
-### [Exercises:Level 2](#exercise-level-2)
-
-1. Write a code which can give grades to students according to theirs scores:
- - 80-100, A
- - 70-89, B
- - 60-69, C
- - 50-59, D
- - 0-49, F
-1. Check if the season is Autumn, Winter, Spring or Summer.
- If the user input is :
- - September, October or November, the season is Autumn.
- - December, January or February, the season is Winter.
- - March, April or May, the season is Spring
- - June, July or August, the season is Summer
-1. Check if a day is weekend day or a working day. Your script will take day as an input.
-
-```sh
- What is the day today? Saturday
- Saturday is a weekend.
-
- What is the day today? saturDaY
- Saturday is a weekend.
-
- What is the day today? Friday
- Friday is a working day.
-
- What is the day today? FrIDAy
- Friday is a working day.
- ```
-
-### [Exercises:Level 3](#exercise-level-3)
-
-1. Write a program which tells the number of days in a month.
-
- ```sh
- Enter a month: January
- January has 31 days.
-
- Enter a month: JANUARY
- January has 31 day
-
- Enter a month: February
- February has 28 days.
-
- Enter a month: FEbruary
- February has 28 days.
- ```
-
-1. Write a program which tells the number of days in a month, now consider leap year.
+- ### [Exercise:Level 1](#exercise-level-1)
+- ### [Exercise:Level 2](#exercise-level-2)
+- ### [Exercise:Level 3](#exercise-level-3)
+ #### [Home](../README.md) | [<< Day 3](./03_day_operators.md) | [Day 5 >>](./05_day_arrays.md)
+## Exercise Solutions
### Exercise Level 1
@@ -183,7 +99,6 @@ else{
}
```
-
### Exercise Level 2
1. Write a code which can give grades to students according to theirs scores:
@@ -336,6 +251,6 @@ switch(month){
}
```
-
+ #### [Home](../README.md) | [<< Day 3](./03_day_operators.md) | [Day 5 >>](./05_day_arrays.md)
diff --git a/Exercise-Solutions/05_day_arrays.md b/Exercise-Solutions/days/05_day_arrays.md
similarity index 99%
rename from Exercise-Solutions/05_day_arrays.md
rename to Exercise-Solutions/days/05_day_arrays.md
index a7604a9..225da69 100644
--- a/Exercise-Solutions/05_day_arrays.md
+++ b/Exercise-Solutions/days/05_day_arrays.md
@@ -469,4 +469,4 @@ const countries = [
```
- #### [Home](../README.md) | [<< Day 5](./05_day_arrays.md) | [Day 7 >>](./07_day_function.md)
+ #### [Home](../README.md) | [<< Day 4](./04_day_conditional.md) | [Day 6 >>](./06_day_loops.md)
\ No newline at end of file
diff --git a/Exercise-Solutions/06_day_loops.md b/Exercise-Solutions/days/06_day_loops.md
similarity index 96%
rename from Exercise-Solutions/06_day_loops.md
rename to Exercise-Solutions/days/06_day_loops.md
index d85b008..89805bf 100644
--- a/Exercise-Solutions/06_day_loops.md
+++ b/Exercise-Solutions/days/06_day_loops.md
@@ -204,6 +204,40 @@ for(let i=1; i<=100; i+=2){
```
9. Use for loop to iterate from 0 to 100 and print only prime numbers
+ ```js
+ //app.js
+
+ // Function to check if a number is prime
+function isPrime(num) {
+ // 1 and numbers <= 1 are not prime
+ if (num <= 1) {
+ return false;
+ }
+ // 2 and 3 are prime
+ if (num <= 3) {
+ return true;
+ }
+ // Exclude even numbers and multiples of 3
+ if (num % 2 === 0 || num % 3 === 0) {
+ return false;
+ }
+ // Check divisibility from 5 upwards
+ for (let i = 5; i * i <= num; i += 6) {
+ if (num % i === 0 || num % (i + 2) === 0) {
+ return false;
+ }
+ }
+ return true;
+}
+
+// Loop from 0 to 100 and print prime numbers
+for (let i = 0; i <= 100; i++) {
+ if (isPrime(i)) {
+ console.log(i);
+ }
+}
+
+ ```
10. Use for loop to iterate from 0 to 100 and print the sum of all numbers.
```
The sum of all numbers from 0 to 100 is 5050.
diff --git a/Exercise-Solutions/07_day_function.md b/Exercise-Solutions/days/07_day_function.md
similarity index 99%
rename from Exercise-Solutions/07_day_function.md
rename to Exercise-Solutions/days/07_day_function.md
index 6ddc432..0d9552b 100644
--- a/Exercise-Solutions/07_day_function.md
+++ b/Exercise-Solutions/days/07_day_function.md
@@ -948,3 +948,4 @@ function reverseCountries(countries) {
return copy.reverse();
}
```
+ #### [Home](../README.md) | [<< Day 6](./06_day_loops.md) | [Day 8 >>](./08_day_object.md)
diff --git a/Exercise-Solutions/08_day_object.md b/Exercise-Solutions/days/08_day_object.md
similarity index 98%
rename from Exercise-Solutions/08_day_object.md
rename to Exercise-Solutions/days/08_day_object.md
index f8401bd..889f1df 100644
--- a/Exercise-Solutions/08_day_object.md
+++ b/Exercise-Solutions/days/08_day_object.md
@@ -8,7 +8,7 @@
- ### [Exercise:Level 2](#exercises-level-2)
- ### [Exercise:Level 3](#exercises-level-3)
- #### [Home](../README.md) | [<< Day 6](./06_day_loops.md) | [Day 8 >>](./08_day_object.md)
+ #### [Home](../README.md) | [<< Day 7](./07_day_function.md) | [Day 9 >>](./09_day_callbac_function.md)
## Exercise Solutions
@@ -562,4 +562,7 @@ const products = [
}
likeProduct("hedfcg","hedfcg")
-```
\ No newline at end of file
+```
+
+ #### [Home](../README.md) | [<< Day 7](./07_day_function.md) | [Day 9 >>](./09_day_callbac_function.md)
+
diff --git a/Exercise-Solutions/09_day_callbac_function.md b/Exercise-Solutions/days/09_day_callbac_function.md
similarity index 93%
rename from Exercise-Solutions/09_day_callbac_function.md
rename to Exercise-Solutions/days/09_day_callbac_function.md
index 3307803..505a24e 100644
--- a/Exercise-Solutions/09_day_callbac_function.md
+++ b/Exercise-Solutions/days/09_day_callbac_function.md
@@ -8,7 +8,7 @@
- ### [Exercise:Level 2](#exercises-level-2)
- ### [Exercise:Level 3](#exercises-level-3)
- #### [Home](../README.md) | [<< Day 6](./06_day_loops.md) | [Day 8 >>](./08_day_object.md)
+ #### [Home](../README.md) | [<< Day 8](./08_day_object.md) | [Day 10 >>](./10_day_sets_and_maps.md)
## Exercise Solutions
@@ -32,10 +32,10 @@ const products = [
1. Explain the difference between forEach, map, filter, and reduce.
```
-foreach dizideki her bir eleman için bir fonksiyon çalıştırir.Dizideki elemani degistirebilir ama yeni bir dizi olisturamaz.
-map foreach ile aynidir farki map yeni bir dizi döndürür.
-reduce, bir dizideki her öğe için belirtilen bir fonksiyonu çalıştırır ve bu fonksiyonun sonuçlarını biriktirerek tek bir değer döndürür. Bu fonksiyon, dizinin her öğesini değiştiremez, ancak bir önceki fonksiyon çağrısının sonucunu alarak bir sonraki fonksiyon çağrısına aktarır.
-filrer JavaScript’te filter metodu, bir dizideki elemanları belirli bir koşula göre filtrelemek için kullanılan bir dizidir. Filter metodu, orijinal diziyi değiştirmez, ancak koşulu sağlayan elemanlardan oluşan yeni bir dizi döndürür
+foreach runs a function for each element in the array. It can change the element in the array, but it cannot create a new array.
+map is the same as foreach, except map returns a new array.
+reduce runs a specified function for each element in an array and accumulates the results of that function, returning a single value. This function cannot modify every element of the array, but takes the result of the previous function call and passes it to the next function call.
+filterer In JavaScript, the filter method is an array used to filter elements in an array based on a certain condition. The filter method does not modify the original array, but returns a new array consisting of elements that satisfy the condition
```
2. Define a callback function before you use it in forEach, map, filter or reduce.
@@ -509,4 +509,7 @@ console.log(result);
Variance: 17.5
Standard Deviation: 4.2
Frequency Distribution: [(20.0, 26), (16.0, 27), (12.0, 32), (8.0, 37), (8.0, 34), (8.0, 33), (8.0, 31), (8.0, 24), (4.0, 38), (4.0, 29), (4.0, 25)]
- ```
\ No newline at end of file
+ ```
+
+
+ #### [Home](../README.md) | [<< Day 8](./08_day_object.md) | [Day 10 >>](./10_day_sets_and_maps.md)
diff --git a/Exercise-Solutions/10_day_sets_and_maps.md b/Exercise-Solutions/days/10_day_sets_and_maps.md
similarity index 79%
rename from Exercise-Solutions/10_day_sets_and_maps.md
rename to Exercise-Solutions/days/10_day_sets_and_maps.md
index dcfeff3..749eb4e 100644
--- a/Exercise-Solutions/10_day_sets_and_maps.md
+++ b/Exercise-Solutions/days/10_day_sets_and_maps.md
@@ -1,9 +1,32 @@
+
+# Day 10 - Set And Maps
+
+
+## [Exercise:Solutions](#exercise-solutions)
+
+- ### [Exercise:Level 1](#exercises-level-1)
+- ### [Exercise:Level 2](#exercises-level-2)
+- ### [Exercise:Level 3](#exercises-level-3)
+
+ #### [Home](../README.md) | [<< Day 9](./09_day_callbac_function.md) | [Day 11 >>](./11_day_des_spreading.md)
+
+
+## Exercise Solutions
+
+ ### Exercises Level 1
+
1. create an empty set
+```js
+// app.js
const countries = new Set()
console.log(countries)
+```
+
2. Create a set containing 0 to 10 using loop
+```js
+// app.js
const set = new Set()
set.add(0,)
@@ -19,15 +42,23 @@ set.add(9)
set.add(10)
console.log(set)
+```
+
3. Remove an element from a set
+```js
+// app.js
const set = new Set()
set.add(0,)
set.add(1)
set.add(2)
console.log(set.delete(1))
+```
+
4. Clear a set
+```js
+// app.js
const set = new Set()
set.add(0,)
@@ -35,14 +66,22 @@ set.add(1)
set.add(2)
set.clear()
console.log(set)
+```
+
5. Create a set of 5 string elements from array
+```js
+// app.js
const arr = ['ayşe','fatma','dilan','cansu']
const set = new Set(arr)
console.log(set)
+```
+
6. Create a map of countries and number of characters of a country
+```js
+// app.js
const map = new Map()
@@ -50,8 +89,10 @@ map.set(1,'turkey')
map.set(2,'russıa')
map.set(3,'germaby')
console.log(map)
+```
-### Exercise Level 2
+
+### Exercises Level 2
1. Find a union b
```js
@@ -151,4 +192,7 @@ console.log(aUnionB)
{French:45},
{Arabic:25}
]
-```
\ No newline at end of file
+```
+
+#### [Home](../README.md) | [<< Day 9](./09_day_callbac_function.md) | [Day 11 >>](./11_day_des_spreading.md)
+
diff --git a/Exercise-Solutions/days/11_day_des_spreading.md b/Exercise-Solutions/days/11_day_des_spreading.md
new file mode 100644
index 0000000..6aef3e1
--- /dev/null
+++ b/Exercise-Solutions/days/11_day_des_spreading.md
@@ -0,0 +1,175 @@
+# Day 11 - Destruction And Spreading
+
+
+## [Exercise:Solutions](#exercise-solutions)
+
+- ### [Exercise:Level 1](#exercises-level-1)
+- ### [Exercise:Level 2](#exercises-level-2)
+- ### [Exercise:Level 3](#exercises-level-3)
+
+ #### [Home](../README.md) | [<< Day 10](./10_day_sets_and_maps.md) | [Day 12 >>](./12_day_regular_ex.md)
+
+
+## Exercise Solutions
+
+ ### Exercises Level 1
+
+
+1. Destructure and assign the elements of constants array to e, pi, gravity, humanBodyTemp, waterBoilingTemp.
+
+```js
+//app.js
+const constants = [2.72, 3.14, 9.81, 37.5, 100]
+const [E,PI,G,humanBodyTemp,waterBoilingTemp] =constants
+console.log(E,PI,G,humanBodyTemp,waterBoilingTemp)
+
+```
+
+
+2. Destructure and assign the elements of countries array to fin, est, sw, den, nor
+```js
+//app.js
+const countries =['Finland','Estonia','Sweden','Denmark','Norway']
+const [fin,est,swd,den,nor] = countries
+console.log(fin,est,swd,den,nor)
+
+```
+
+
+
+3. Destructure the rectangle object by its properties or keys.
+```js
+//app.js
+const rectangle ={
+ width:20,
+ height:10,
+ are:200,
+ perimeter:60
+}
+
+const {width,height,are,perimeter} = rectangle
+console.log(width,height,are,perimeter)
+
+
+```
+
+
+
+ ### Exercises Level 2
+
+
+1. Iterate through the users array and get all the keys of the object using destructuring
+```js
+//app.js
+const users = [
+ {
+ name:'Brook',
+ scores:75,
+ skills:['HTM', 'CSS', 'JS'],
+ age:16
+ },
+ {
+ name:'Alex',
+ scores:80,
+ skills:['HTM', 'CSS', 'JS'],
+ age:18
+ },
+ {
+ name:'David',
+ scores:75,
+ skills:['HTM', 'CSS'],
+ age:22
+ },
+ {
+ name:'John',
+ scores:85,
+ skills:['HTML'],
+ age:25
+ },
+ {
+ name:'Sara',
+ scores:95,
+ skills:['HTM', 'CSS', 'JS'],
+ age: 26
+ },
+ {
+ name:'Martha',
+ scores:80,
+ skills:['HTM', 'CSS', 'JS'],
+ age:18
+ },
+ {
+ name:'Thomas',
+ scores:90,
+ skills:['HTM', 'CSS', 'JS'],
+ age:20
+ }
+ ]
+ for( const {name,scores,skills,age} of users){
+ console.log(name,scores,skills,age)
+ }
+
+```
+
+
+2. Find the persons who have less than two skills
+```js
+//app.js
+
+const users = [
+{
+ name:'Brook',
+ scores:75,
+ skills:['HTM', 'CSS', 'JS'],
+ age:16
+},
+{
+ name:'Alex',
+ scores:80,
+ skills:['HTM', 'CSS', 'JS'],
+ age:18
+},
+{
+ name:'David',
+ scores:75,
+ skills:['HTM', 'CSS'],
+ age:22
+},
+{
+ name:'John',
+ scores:85,
+ skills:['HTML'],
+ age:25
+},
+{
+ name:'Sara',
+ scores:95,
+ skills:['HTM', 'CSS', 'JS'],
+ age: 26
+},
+{
+ name:'Martha',
+ scores:80,
+ skills:['HTM', 'CSS', 'JS'],
+ age:18
+},
+{
+ name:'Thomas',
+ scores:90,
+ skills:['HTM', 'CSS', 'JS'],
+ age:20
+}
+]
+let a = users.forEach((element) => {
+ if(element.skills.length <=2){
+ console.log(element)
+ }
+})
+```
+
+
+ ### Exercises Level 3
+
+
+
+ #### [Home](../README.md) | [<< Day 10](./10_day_sets_and_maps.md) | [Day 12 >>](./12_day_regular_ex.md)
\ No newline at end of file
diff --git a/Exercise-Solutions/days/12_day_regular_ex.md b/Exercise-Solutions/days/12_day_regular_ex.md
new file mode 100644
index 0000000..ee7e6e8
--- /dev/null
+++ b/Exercise-Solutions/days/12_day_regular_ex.md
@@ -0,0 +1,94 @@
+ # Day 12 - Regex
+
+
+## [Exercise:Solutions](#exercise-solutions)
+
+- ### [Exercise:Level 1](#exercises-level-1)
+- ### [Exercise:Level 2](#exercises-level-2)
+- ### [Exercise:Level 3](#exercises-level-3)
+
+ #### [Home](../README.md) | [<< Day 11](./11_day_des_spreading.md) | [Day 13 >>](./13_day_consol_objmth.md)
+
+
+## Exercise Solutions
+
+ ### Exercises Level 1
+
+
+ 1. Calculate the total annual income of the person from the following text. ‘He earns 4000 euro from salary per month, 10000 euro annual bonus, 5500 euro online courses per month.’
+```js
+// app.js
+let text ="He earns 4000 euro from salary per month, 10000 euro annual bonus, 5500 euro online courses per month."
+let pattern = /\d+/g
+let numbers = text.match(pattern)
+numbers = numbers.map(Number)
+let montlySalary = numbers[0]
+let bonus = numbers[1]
+let montCourses = numbers[2]
+console.log(`Annual income is ${(montlySalary*12) + (bonus) + (montCourses *12)}`)
+
+```
+
+
+2. The position of some particles on the horizontal x-axis -12, -4, -3 and -1 in the negative direction, 0 at origin, 4 and 8 in the positive direction. Extract these numbers and find the distance between the two furthest particles.
+```js
+// app.js
+```
+
+3. Write a pattern which identify if a string is a valid JavaScript variable
+
+```js
+// app.js
+function isValidVariableName(str) {
+ // Birinci karakterin harf, alt çizgi veya dolar işareti olup olmadığını kontrol eden bir kalıp
+ var firstCharPattern = /^[a-zA-Z_$]/;
+ // Diğer karakterlerin harf, rakam, alt çizgi veya dolar işareti olup olmadığını kontrol eden bir kalıp
+ var otherCharPattern = /^[a-zA-Z0-9_$]*$/;
+ // Dizenin rezerve edilmiş bir kelime olup olmadığını kontrol eden bir dizi
+ var reservedWords = ["var", "let", "const", "function", "if", "else"];
+ // Dizenin boş olmadığını, birinci karakterin kalıpla eşleştiğini, diğer karakterlerin kalıpla eşleştiğini ve rezerve edilmiş kelimeler arasında olmadığını kontrol eder
+ return str && firstCharPattern.test(str) && otherCharPattern.test(str) && !reservedWords.includes(str);
+ }
+console.log(isValidVariableName('21dzfgdf'))
+
+```
+
+### Exercises Level 2
+
+1. Write a function called tenMostFrequentWords which get the ten most frequent word from a string?
+
+```
+let paragraph = `I love teaching. If you do not love teaching what else can you love. I love Python if you do not love something which can give you all the capabilities to develop an application what else can you love.`
+```
+
+```js
+// app.js
+function tenMostFrequentWords(paragraph) {
+ // Paragrafı kelimelere ayırırken noktalama işaretlerini ve büyük harfleri yok sayar
+ var words = paragraph.toLowerCase().replace(/[.,]/g, '').split(/\s/);
+ // Her kelimenin frekansını tutan bir nesne oluşturur
+ var freqMap = {};
+ words.forEach(function(word) {
+ // Kelime nesnede yoksa 0, varsa mevcut değerine 1 ekler
+ freqMap[word] = (freqMap[word] || 0) + 1;
+ });
+ // Nesneyi bir diziye dönüştürür ve frekansa göre azalan şekilde sıralar
+ var sorted = Object.entries(freqMap).sort(function(a, b) {
+ return b[1] - a[1];
+ });
+ // Sadece ilk 10 elemanı alır ve kelimeleri bir dizi olarak döndürür
+ return sorted.slice(0, 10).map(function(pair) {
+ return pair[0];
+ });
+ }
+console.log( tenMostFrequentWords(paragraph))
+
+```
+### Exercises Level 3
+
+
+1. Writ a function which cleans text. Clean the following text. After cleaning, count three most frequent words in the string.
+
+
+ #### [Home](../README.md) | [<< Day 11](./11_day_des_spreading.md) | [Day 13 >>](./13_day_consol_objmth.md)
+
diff --git a/Exercise-Solutions/days/13_day_consol_objmth.md b/Exercise-Solutions/days/13_day_consol_objmth.md
new file mode 100644
index 0000000..a3c59dc
--- /dev/null
+++ b/Exercise-Solutions/days/13_day_consol_objmth.md
@@ -0,0 +1,113 @@
+ # Day 13 - Console Object Methods
+
+
+## [Exercise:Solutions](#exercise-solutions)
+
+- ### [Exercise:Level 1](#exercises-level-1)
+- ### [Exercise:Level 2](#exercises-level-2)
+- ### [Exercise:Level 3](#exercises-level-3)
+
+
+ #### [Home](../README.md) | [<< Day 12](./12_day_regular_ex.md) | [Day 14 >>](./14_day_error_handling.md)
+
+
+
+## Exercise Solutions
+
+ ### Exercises Level 1
+
+
+ 1. Display the countries array as a table
+```js
+// app.js
+const countries = ['Norway', 'Sweden','England','Iceland']
+console.table(countries)
+
+```
+
+ 2. Display the countries object as a table
+```js
+// app.js
+const countries ={
+ countri: 'Germany',
+ popolation: 564654,
+ lamgue: 'German'
+}
+console.table(countries)
+
+```
+
+ 3. Use console.group() to group logs
+```js
+// app.js
+
+const names = ['Asabeneh', 'Brook', 'David', 'John']
+const countries = [
+ ['Finland', 'Helsinki'],
+ ['Sweden', 'Stockholm'],
+ ['Norway', 'Oslo']
+]
+const user = {
+ name: 'Asabeneh',
+ title: 'Programmer',
+ country: 'Finland',
+ city: 'Helsinki',
+ age: 250
+}
+const users = [
+ {
+ name: 'Asabeneh',
+ title: 'Programmer',
+ country: 'Finland',
+ city: 'Helsinki',
+ age: 250
+ },
+ {
+ name: 'Eyob',
+ title: 'Teacher',
+ country: 'Sweden',
+ city: 'London',
+ age: 25
+ },
+ {
+ name: 'Asab',
+ title: 'Instructor',
+ country: 'Norway',
+ city: 'Oslo',
+ age: 22
+ },
+ {
+ name: 'Matias',
+ title: 'Developer',
+ country: 'Denmark',
+ city: 'Copenhagen',
+ age: 28
+ }
+]
+
+console.group('names')
+console.log(names)
+console.groupEnd()
+
+console.group('countries')
+console.log(countries)
+console.groupEnd()
+
+console.group('user')
+console.log(user)
+console.groupEnd()
+
+```
+
+### Exercises Level 2
+1. 10 > 2 * 10 use console.assert()
+2. Write a warning message using console.warn()
+3. Write an error message using console.error()
+
+### Exercises Level 3
+1. Check the speed difference among the following loops: while, for, for of, forEach
+
+
+
+ #### [Home](../README.md) | [<< Day 12](./12_day_regular_ex.md) | [Day 14 >>](./14_day_error_handling.md)
+
diff --git a/Exercise-Solutions/days/14_day_error_handling.md b/Exercise-Solutions/days/14_day_error_handling.md
new file mode 100644
index 0000000..bf5aa5c
--- /dev/null
+++ b/Exercise-Solutions/days/14_day_error_handling.md
@@ -0,0 +1,8 @@
+
+# Day 14 - Error Handling
+
+### No exercise today. Continue from day 15
+
+
+ #### [Home](../README.md) | [<< Day 13](./13_day_consol_objmth.md) | [Day 15>>](./15_day_classes.md)
+
diff --git a/Exercise-Solutions/days/15_day_classes.md b/Exercise-Solutions/days/15_day_classes.md
new file mode 100644
index 0000000..e36da3a
--- /dev/null
+++ b/Exercise-Solutions/days/15_day_classes.md
@@ -0,0 +1,242 @@
+ # Day 15 - Classes
+
+## [Exercise:Solutions](#exercise-solutions)
+
+- ### [Exercise:Level 1](#exercises-level-1)
+- ### [Exercise:Level 2](#exercises-level-2)
+- ### [Exercise:Level 3](#exercises-level-3)
+
+
+ #### [Home](../README.md) | [<< Day 14](./14_day_error_handling.md) | [Day 16 >>](./16_day_JSON.md)
+
+## Exercise Solutions
+
+### Exercises Level 1
+
+1. Create an Animal class. The class will have name, age, color, legs properties and create different methods
+```js
+// app.js
+
+class Animal {
+ constructor(name,age,color,leg){
+ this.name = name
+ this.age=age
+ this.color=color
+ this.leg=leg
+ }
+ calculaterBirthYear(){
+ const currentYear = new Date().getFullYear()
+ const birthYear = currentYear - this.age
+ return birthYear
+ }
+
+}
+
+```
+
+
+2. Create a Dog and Cat child class from the Animal Class.
+
+```js
+// app.js
+
+class Animal {
+ constructor(name,age,color,leg){
+ this.name = name
+ this.age=age
+ this.color=color
+ this.leg=leg
+ }
+ calculaterBirthYear(){
+ const currentYear = new Date().getFullYear()
+ const birthYear = currentYear - this.age
+ return birthYear
+ }
+
+}
+
+const dog1 = new Animal("beşo",5,"red",4)
+const cat1= new Animal("lesi",3,"white",2)
+
+
+console.log(dog1.calculaterBirthYear())
+console.log(cat1.calculaterBirthYear())
+```
+### Exercises Level 2
+
+1. Override the method you create in Animal class
+```js
+// app.js
+
+
+class Animal {
+ constructor(name,age,color,leg){
+ this.name = name
+ this.age=age
+ this.color=color
+ this.leg=leg
+ }
+ static calculaterBirthYear(){
+ const currentYear = new Date().getFullYear()
+ const birthYear = currentYear - this.age
+ return birthYear
+ }
+
+}
+
+const dog1 = new Animal("beşo",5,"red",4)
+const cat1= new Animal("lesi",3,"white",2)
+
+
+console.log(dog1.calculaterBirthYear())
+console.log(cat1.calculaterBirthYear())
+
+```
+### Exercises Level 3
+
+1. Let's try to develop a program which calculate measure of central tendency of a sample(mean, median, mode) and measure of variability(range, variance, standard deviation). In addition to those measures find the min, max, count, percentile, and frequency distribution of the sample. You can create a class called Statistics and create all the functions which do statistical calculations as method for the Statistics class. Check the output below.
+
+
+```js
+// app.js
+
+class Statistics {
+ constructor(data) {
+ this.data = data;
+ }
+
+ mean() {
+ return this.data.reduce((a, b) => a + b) / this.data.length;
+ }
+
+ median() {
+ const sortedData = this.data.sort((a, b) => a - b);
+ const middleIndex = Math.floor(sortedData.length / 2);
+ if (sortedData.length % 2 === 0) {
+ return (sortedData[middleIndex - 1] + sortedData[middleIndex]) / 2;
+ } else {
+ return sortedData[middleIndex];
+ }
+ }
+
+ mode() {
+ const frequencyTable = {};
+ let maxFrequency = 0;
+ let modes = [];
+ for (const value of this.data) {
+ frequencyTable[value] = (frequencyTable[value] || 0) + 1;
+ if (frequencyTable[value] > maxFrequency) {
+ maxFrequency = frequencyTable[value];
+ modes = [value];
+ } else if (frequencyTable[value] === maxFrequency) {
+ modes.push(value);
+ }
+ }
+ return modes;
+ }
+
+ range() {
+ return Math.max(...this.data) - Math.min(...this.data);
+ }
+
+ variance() {
+ const mean = this.mean();
+ return this.data.reduce((a, b) => a + (b - mean) ** 2, 0) / this.data.length;
+ }
+
+ standardDeviation() {
+ return Math.sqrt(this.variance());
+ }
+
+ minimum() {
+ return Math.min(...this.data);
+ }
+
+ maximum() {
+ return Math.max(...this.data);
+ }
+
+ count() {
+ return this.data.length;
+ }
+
+ percentile(p) {
+ const sortedData = this.data.sort((a, b) => a - b);
+ const index = (p / 100) * (sortedData.length - 1);
+ if (Number.isInteger(index)) {
+ return sortedData[index];
+ } else {
+ const lowerIndex = Math.floor(index);
+ const upperIndex = Math.ceil(index);
+ return (sortedData[lowerIndex] + sortedData[upperIndex]) / 2;
+ }
+ }
+
+ frequencyDistribution() {
+ const frequencyTable = {};
+ for (const value of this.data) {
+ frequencyTable[value] = (frequencyTable[value] || 0) + 1;
+ }
+ return frequencyTable;
+ }
+}
+
+ages = [31, 26, 34, 37, 27, 26, 32, 32, 26, 27, 27, 24, 32, 33, 27, 25, 26, 38, 37, 31, 34, 24, 33, 29, 26]
+const stats = new Statistics(ages);
+
+console.log(`Mean: ${stats.mean()}`);
+console.log(`Median: ${stats.median()}`);
+console.log(`Mode: ${stats.mode()}`);
+console.log(`Range: ${stats.range()}`);
+console.log(`Variance: ${stats.variance()}`);
+console.log(`Standard Deviation: ${stats.standardDeviation()}`);
+console.log(`Minimum: ${stats.minimum()}`);
+console.log(`Maximum: ${stats.maximum()}`);
+console.log(`Count: ${stats.count()}`);
+console.log(`25th Percentile: ${stats.percentile(25)}`);
+console.log(`Frequency Distribution: ${JSON.stringify(stats.frequencyDistribution())}`);
+```
+1. Create a class called PersonAccount. It has firstname, lastname, incomes, expenses properties and it has totalIncome, totalExpense, accountInfo,addIncome, addExpense and accountBalance methods. Incomes is a set of incomes and its description and expenses is also a set of expenses and its description.
+
+```js
+// ap.js
+
+class PersonAccount {
+ constructor(name, surname, incomes, expenses) {
+ this.name = name;
+ this.surname = surname;
+ this.incomes = incomes;
+ this.expenses = expenses;
+ }
+
+ totalIncome() {
+ return this.incomes.reduce((a, b) => a + b, 0);
+ }
+
+ totalExpense() {
+ return this.expenses.reduce((a, b) => a + b, 0);
+ }
+
+ accountInfo() {
+ return `${this.name} ${this.surname} has a total income of ${this.totalIncome()} and a total expense of ${this.totalExpense()}.`;
+ }
+
+ addIncome(income) {
+ this.incomes.push(income);
+ }
+
+ addExpense(expense) {
+ this.expenses.push(expense);
+ }
+
+ accountBalance() {
+ return this.totalIncome() - this.totalExpense();
+ }
+}
+
+const person = new PersonAccount('Nevzat', 'Atalay', [1000, 2000, 3000], [500, 1000]);
+console.log(person.accountInfo()); // John Doe has a total income of 6000 and a total expense of 1500.
+console.log(person.accountBalance()); // 4500
+```
+
+ #### [Home](../README.md) | [<< Day 14](./14_day_error_handling.md) | [Day 16 >>](./16_day_JSON.md)
diff --git a/Exercise-Solutions/days/16_day_JSON.md b/Exercise-Solutions/days/16_day_JSON.md
new file mode 100644
index 0000000..88e14e2
--- /dev/null
+++ b/Exercise-Solutions/days/16_day_JSON.md
@@ -0,0 +1,304 @@
+ # Day 16 - Json
+
+
+## [Exercise:Solutions](#exercise-solutions)
+
+- ### [Exercise:Level 1](#exercises-level-1)
+- ### [Exercise:Level 2](#exercises-level-2)
+- ### [Exercise:Level 3](#exercises-level-3)
+
+
+ #### [Home](../README.md) | [<< Day 15](./15_day_classes.md) | [Day 17 >>](./17_day_wep%20storege.md)
+
+## Exercise Solutions
+
+```js
+const skills = ['HTML', 'CSS', 'JS', 'React','Node', 'Python']
+let age = 250;
+let isMarried = true
+const student = {
+ firstName:'Asabeneh',
+ lastName:'Yetayehe',
+ age:250,
+ isMarried:true,
+ skills:['HTML', 'CSS', 'JS', 'React','Node', 'Python', ]
+}
+const txt = `{
+ "Alex": {
+ "email": "alex@alex.com",
+ "skills": [
+ "HTML",
+ "CSS",
+ "JavaScript"
+ ],
+ "age": 20,
+ "isLoggedIn": false,
+ "points": 30
+ },
+ "Asab": {
+ "email": "asab@asab.com",
+ "skills": [
+ "HTML",
+ "CSS",
+ "JavaScript",
+ "Redux",
+ "MongoDB",
+ "Express",
+ "React",
+ "Node"
+ ],
+ "age": 25,
+ "isLoggedIn": false,
+ "points": 50
+ },
+ "Brook": {
+ "email": "daniel@daniel.com",
+ "skills": [
+ "HTML",
+ "CSS",
+ "JavaScript",
+ "React",
+ "Redux"
+ ],
+ "age": 30,
+ "isLoggedIn": true,
+ "points": 50
+ },
+ "Daniel": {
+ "email": "daniel@alex.com",
+ "skills": [
+ "HTML",
+ "CSS",
+ "JavaScript",
+ "Python"
+ ],
+ "age": 20,
+ "isLoggedIn": false,
+ "points": 40
+ },
+ "John": {
+ "email": "john@john.com",
+ "skills": [
+ "HTML",
+ "CSS",
+ "JavaScript",
+ "React",
+ "Redux",
+ "Node.js"
+ ],
+ "age": 20,
+ "isLoggedIn": true,
+ "points": 50
+ },
+ "Thomas": {
+ "email": "thomas@thomas.com",
+ "skills": [
+ "HTML",
+ "CSS",
+ "JavaScript",
+ "React"
+ ],
+ "age": 20,
+ "isLoggedIn": false,
+ "points": 40
+ },
+ "Paul": {
+ "email": "paul@paul.com",
+ "skills": [
+ "HTML",
+ "CSS",
+ "JavaScript",
+ "MongoDB",
+ "Express",
+ "React",
+ "Node"
+ ],
+ "age": 20,
+ "isLoggedIn": false,
+ "points": 40
+ }
+}
+```
+### Exercises Level 1
+
+1. Change skills array to JSON using JSON.stringify()
+```js
+//app.js
+
+const skills = ['HTML', 'CSS', 'JS', 'React','Node', 'Python']
+
+console.log(JSON.stringify(skills))
+```
+1. Stringify the age variable
+```js
+//app.js
+
+let age = 250;
+console.log(JSON.stringify(age))
+```
+1. Stringify the isMarried variable
+```js
+//app.js
+
+let isMarried = true
+console.log(JSON.stringify(isMarried))
+```
+1. Stringify the student object
+```js
+//app.js
+
+const student = {
+ firstName:'Asabeneh',
+ lastName:'Yetayehe',
+ age:250,
+ isMarried:true,
+ skills:['HTML', 'CSS', 'JS', 'React','Node', 'Python', ]
+}
+
+console.log(JSON.stringify(student))
+```
+
+### Exercises Level 2
+
+1. Stringify the students object with only firstName, lastName and skills properties
+```js
+//app.js
+
+const student = {
+ firstName:'Asabeneh',
+ lastName:'Yetayehe',
+ age:250,
+ isMarried:true,
+ skills:['HTML', 'CSS', 'JS', 'React','Node', 'Python', ]
+};
+
+const studentString = JSON.stringify({
+ firstName: student.firstName,
+ lastName: student.lastName,
+ skills: student.skills
+});
+
+console.log(studentString);
+
+```
+
+### Exercises Level 3
+
+1. Parse the *txt* JSON to object.
+```js
+//app.js
+
+ const obj = JSON.parse(txt);
+ console.log(obj);
+
+```
+2. Find the user who has many skills from the variable stored in *txt*.
+```js
+//app.js
+
+const txt = {
+ "Alex": {
+ "email": "alex@alex.com",
+ "skills": [
+ "HTML",
+ "CSS",
+ "JavaScript"
+ ],
+ "age": 20,
+ "isLoggedIn": false,
+ "points": 30
+ },
+ "Asab": {
+ "email": "asab@asab.com",
+ "skills": [
+ "HTML",
+ "CSS",
+ "JavaScript",
+ "Redux",
+ "MongoDB",
+ "Express",
+ "React",
+ "Node"
+ ],
+ "age": 25,
+ "isLoggedIn": false,
+ "points": 50
+ },
+ "Brook": {
+ "email": "daniel@daniel.com",
+ "skills": [
+ "HTML",
+ "CSS",
+ "JavaScript",
+ "React",
+ "Redux"
+ ],
+ "age": 30,
+ "isLoggedIn": true,
+ "points": 50
+ },
+ "Daniel": {
+ "email": "daniel@alex.com",
+ "skills": [
+ "HTML",
+ "CSS",
+ "JavaScript",
+ "Python"
+ ],
+ "age": 20,
+ "isLoggedIn": false,
+ "points": 40
+ },
+ "John": {
+ "email": "john@john.com",
+ "skills": [
+ "HTML",
+ "CSS",
+ "JavaScript",
+ "React",
+ "Redux",
+ "Node.js"
+ ],
+ "age": 20,
+ "isLoggedIn": true,
+ "points": 50
+ },
+ "Thomas": {
+ "email": "thomas@thomas.com",
+ "skills": [
+ "HTML",
+ "CSS",
+ "JavaScript",
+ "React"
+ ],
+ "age": 20,
+ "isLoggedIn": false,
+ "points": 40
+ },
+ "Paul": {
+ "email": "paul@paul.com",
+ "skills": [
+ "HTML",
+ "CSS",
+ "JavaScript",
+ "MongoDB",
+ "Express",
+ "React",
+ "Node"
+ ],
+ "age": 20,
+ "isLoggedIn": false,
+ "points": 40
+ }
+};
+
+const userWithMostSkills = Object.keys(txt).reduce((a, b) => txt[a].skills.length > txt[b].skills.length ? a : b);
+
+console.log(`The user with the most skills is ${userWithMostSkills}.`);
+
+```
+
+
+
+
+ #### [Home](../README.md) | [<< Day 15](./15_day_classes.md) | [Day 17 >>](./17_day_wep%20storege.md)
\ No newline at end of file
diff --git a/Exercise-Solutions/days/17_day_wep storege.md b/Exercise-Solutions/days/17_day_wep storege.md
new file mode 100644
index 0000000..91cd497
--- /dev/null
+++ b/Exercise-Solutions/days/17_day_wep storege.md
@@ -0,0 +1,96 @@
+ # Day 17 - Web Storaage
+
+
+## [Exercise:Solutions](#exercise-solutions)
+
+- ### [Exercise:Level 1](#exercises-level-1)
+- ### [Exercise:Level 2](#exercises-level-2)
+- ### [Exercise:Level 3](#exercises-level-3)
+
+
+ #### [Home](../README.md) | [<< Day 16](./16_day_JSON.md) | [Day 18 >>](./18_day_promise.md)
+
+## Exercise Solutions
+
+
+### Exercises: Level 1
+
+1. Store you first name, last name, age, country, city in your browser localStorage.
+```js
+// app.js
+
+let firstName = "nevzat"
+let lasrName="Atalay"
+let age= 25
+let city ="BİTLİS"
+let country = "Turkey"
+
+localStorage.setItem("name",JSON.stringify(firstName))
+localStorage.setItem("lastName",JSON.stringify(lasrName))
+localStorage.setItem("age",JSON.stringify(age))
+localStorage.setItem("city",JSON.stringify(city))
+localStorage.setItem("country",JSON.stringify(country))
+```
+
+### Exercises: Level 2
+
+1. Create a student object. The student object will have first name, last name, age, skills, country, enrolled keys and values for the keys. Store the student object in your browser localStorage.
+```js
+// app.js
+
+let student = {
+ firstName:"Nevzat",
+ lastName:"Atalay",
+ age:25,
+ skills:["HTML","CSS","JavaScript"],
+ country:"Turkey",
+}
+
+localStorage.setItem("student",JSON.stringify(student))
+```
+### Exercises: Level 3
+
+1. Create an object called personAccount. It has firstname, lastname, incomes, expenses properties and it has totalIncome, totalExpense, accountInfo,addIncome, addExpense and accountBalance methods. Incomes is a set of incomes and its description and expenses is also a set of expenses and its description.
+
+
+```js
+// ap.js
+
+class PersonAccount {
+ constructor(name, surname, incomes, expenses) {
+ this.name = name;
+ this.surname = surname;
+ this.incomes = incomes;
+ this.expenses = expenses;
+ }
+
+ totalIncome() {
+ return this.incomes.reduce((a, b) => a + b, 0);
+ }
+
+ totalExpense() {
+ return this.expenses.reduce((a, b) => a + b, 0);
+ }
+
+ accountInfo() {
+ return `${this.name} ${this.surname} has a total income of ${this.totalIncome()} and a total expense of ${this.totalExpense()}.`;
+ }
+
+ addIncome(income) {
+ this.incomes.push(income);
+ }
+
+ addExpense(expense) {
+ this.expenses.push(expense);
+ }
+
+ accountBalance() {
+ return this.totalIncome() - this.totalExpense();
+ }
+}
+
+const person = new PersonAccount('Nevzat', 'Atalay', [1000, 2000, 3000], [500, 1000]);
+console.log(person.accountInfo());
+console.log(person.accountBalance()); // 4500
+```
+ #### [Home](../README.md) | [<< Day 16](./16_day_JSON.md) | [Day 18 >>](./18_day_promise.md)
\ No newline at end of file
diff --git a/Exercise-Solutions/days/18_day_promise.md b/Exercise-Solutions/days/18_day_promise.md
new file mode 100644
index 0000000..a76a956
--- /dev/null
+++ b/Exercise-Solutions/days/18_day_promise.md
@@ -0,0 +1,101 @@
+ # Day 18 - Promise
+
+
+## [Exercise:Solutions](#exercise-solutions)
+
+- ### [Exercise:Level 1](#exercises-level-1)
+- ### [Exercise:Level 2](#exercises-level-2)
+- ### [Exercise:Level 3](#exercises-level-3)
+
+
+ #### [Home](../README.md) | [<< Day 17](./17_day_wep%20storege.md) | [Day 19 >>](./19_day_clouse.md)
+
+## Exercise Solutions
+
+### Exercises: Level 1
+
+1. Read the countries API using fetch and print the name of country, capital, languages, population and area.
+```js
+// app.js
+const countriesAPI = 'https://restcountries.com/v2/all'
+
+fetch('https://restcountries.com/v2/all')
+.then(response => response.json())
+.then(data => {
+ data.forEach(country => {
+ const name = country.name;
+ const capital = country.capital;
+ const languages = country.languages.map(language => language.name);
+ const population = country.population;
+ const region = country.region;
+ console.log(`${name}, başkenti ${capital}'dir. Nüfusu ${population} ve bölgesi ${region}. Konuşulan diller: ${languages.join(', ')}`);
+ });
+});
+```
+
+### Exercises: Level 2
+
+1. Print out all the cat names in to catNames variable.
+```js
+// app.js
+
+fetch('https://api.thecatapi.com/v1/breeds')
+ .then(response => response.json())
+ .then(data => {
+ const catNames = data.map(cat => cat.name);
+ console.log(catNames);
+ });
+
+```
+### Exercises: Level 3
+
+1. Read the cats api and find the average weight of cat in metric unit.
+```js
+// app.js
+const catsAPI = 'https://api.thecatapi.com/v1/breeds'
+
+fetch('https://api.thecatapi.com/v1/breeds')
+ .then(response => response.json())
+ .then(data => {
+ const weights = data.map(cat => cat.weight.metric);
+ console.log(weights);
+ });
+
+```
+2. Read the countries api and find out the 10 largest countries
+```js
+// app.js
+fetch('https://restcountries.com/v2/all')
+ .then(response => response.json())
+ .then(data => {
+ data.sort((a, b) => b.area - a.area);
+ const top10 = data.slice(0, 10);
+ top10.forEach(country => {
+ const name = country.name;
+ const capital = country.capital;
+ const languages = country.languages.map(language => language.name);
+ const population = country.population;
+ const region = country.region;
+ console.log(`${name}, başkenti ${capital}'dir. Nüfusu ${population} ve bölgesi ${region}. Konuşulan diller: ${languages.join(', ')}`);
+ });
+ });
+
+```
+3. Read the countries api and count total number of languages in the world used as officials.
+
+```js
+// app.js
+fetch('https://restcountries.com/v2/all')
+ .then(response => response.json())
+ .then(data => {
+ const languages = new Set();
+ data.forEach(country => {
+ country.languages.forEach(language => {
+ languages.add(language.name);
+ });
+ });
+ console.log(`Dünya genelinde resmi olarak kullanılan dillerin toplam sayısı: ${languages.size}`);
+ });
+
+```
+ #### [Home](../README.md) | [<< Day 17](./17_day_wep%20storege.md) | [Day 19 >>](./19_day_clouse.md)
\ No newline at end of file
diff --git a/Exercise-Solutions/days/19_day_clouse.md b/Exercise-Solutions/days/19_day_clouse.md
new file mode 100644
index 0000000..cc33e89
--- /dev/null
+++ b/Exercise-Solutions/days/19_day_clouse.md
@@ -0,0 +1,74 @@
+ # Day 19 - Closures
+
+## [Exercise:Solutions](#exercise-solutions)
+
+- ### [Exercise:Level 1](#exercises-level-1)
+- ### [Exercise:Level 2](#exercises-level-2)
+- ### [Exercise:Level 3](#exercises-level-3)
+
+
+ #### [Home](../README.md) | [<< Day 18](./18_day_promise.md) | [Day 20 >>](./20_day_cleanCode.md)
+
+## Exercise Solutions
+
+### Exercises: Level 1
+
+1. Create a closure which has one inner function
+```js
+// app.js
+function myFunction(){
+ let firstName ="Nevzat"
+ let lastName = "Atalay"
+
+ function innerFunction(){
+ return console.log(firstName,lastName)
+ }
+ return innerFunction
+}
+
+const innerFun = myFunction()
+
+innerFun()
+```
+### Exercises: Level 2
+
+1. Create a closure which has three inner functions
+```js
+// app.js
+
+function myFunction(){
+ let a =5
+ let b = 7
+
+ function total(){
+ return a + b
+ }
+ function extraction(){
+ return a - b
+ }
+ function multiply(){
+ return a * b
+ }
+
+ return{
+ total:total(),
+ extraction:extraction(),
+ multiply:multiply()
+ }
+
+
+}
+
+const innerFun = myFunction()
+
+console.log(innerFun.total)
+console.log(innerFun.extraction)
+console.log(innerFun.multiply)
+
+```
+### Exercises: Level 3
+
+1. Create a personAccount out function. It has firstname, lastname, incomes, expenses inner variables. It has totalIncome, totalExpense, accountInfo,addIncome, addExpense and accountBalance inner functions. Incomes is a set of incomes and its description and expenses is also a set of expenses and its description.
+
+
+ #### [Home](../README.md) | [<< Day 18](./18_day_promise.md) | [Day 20 >>](./20_day_cleanCode.md)
diff --git a/Exercise-Solutions/days/20_day_cleanCode.md b/Exercise-Solutions/days/20_day_cleanCode.md
new file mode 100644
index 0000000..90c7434
--- /dev/null
+++ b/Exercise-Solutions/days/20_day_cleanCode.md
@@ -0,0 +1,7 @@
+# Day 20 Clean Code
+
+### No exercise today. Continue from day 21
+
+
+ #### [Home](../README.md) | [<< Day 19](./19_day_clouse.md) | [Day 21>>](./21_day_DOM.md)
+
diff --git a/Exercise-Solutions/days/21_day_DOM.md b/Exercise-Solutions/days/21_day_DOM.md
new file mode 100644
index 0000000..50b01ec
--- /dev/null
+++ b/Exercise-Solutions/days/21_day_DOM.md
@@ -0,0 +1,162 @@
+# Day 21 - Dom 1
+
+## [Exercise:Solutions](#exercise-solutions)
+
+- ### [Exercise:Level 1](#exercises-level-1)
+- ### [Exercise:Level 2](#exercises-level-2)
+- ### [Exercise:Level 3](#exercises-level-3)
+
+#### [Home](../README.md) | [<< Day 20](./20_day_cleanCode.md) | [Day 22 >>](./22_day_DOM2.md)
+
+## Exercise Solutions
+
+### Exercise Level 1
+
+1. Create an index.html file and put four p elements as above: Get the first paragraph by using document.querySelector(tagname) and tag name
+
+````js
+
first
+
second
+
third
+```
+```js
+//app.js
+
+const firstParagraph = document.querySelector('p')
+console.log(firstParagraph)
+````
+
+2. Get each of the the paragraph using document.querySelector('#id') and by their id
+
+```js
+//app.js
+
+let firstParagraph = document.querySelector("#first-paragraph");
+let secondParagraph = document.querySelector("#second-paragraph");
+let thirdParagraph = document.querySelector("#third-paragraph");
+console.log(firstParagraph, secondParagraph, thirdParagraph);
+```
+
+3. Get all the p as nodeList using document.querySelectorAll(tagname) and by their tag name
+
+```js
+//app.js
+const allParagraph = document.querySelectorAll("p");
+console.log(allParagraph);
+```
+
+4. Lop through the nodeList and get the text content of each paragraph
+
+```js
+//app.js
+
+const allParagraph = document.querySelectorAll("p");
+for (let i = 0; i < allParagraph.length; i++) {
+ console.log(allParagraph[i]);
+}
+```
+
+5. Set a text content to paragraph the fourth paragraph,Fourth Paragraph
+
+```js
+//app.js
+
+const paragraf = document.querySelectorAll("p");
+paragraf[3].textContent = "four paragraf";
+```
+
+6. Set id and class attribute for all the paragraphs using different attribute setting methods
+
+```js
+//app.js
+
+const paragraph = document.querySelectorAll("p");
+
+paragraph[0].className = "parag_one";
+paragraph[0].id = "id_one";
+
+paragraph[1].setAttribute("class", "paragraph_two");
+paragraph[1].setAttribute("id", "id_two");
+
+paragraph[2].classList = "paragraph_thre";
+paragraph[2].id = "id_thre";
+
+paragraph[3].setAttribute("class", "paragraph_four");
+paragraph[3].setAttribute("id", "id_four");
+
+console.log(paragraph);
+```
+
+### Exercise Level 2
+
+
+1. Change stye of each paragraph using JavaScript(eg. color, background, border, font-size, font-family)
+
+const paragraf =document.querySelectorAll('p')
+
+paragraf[0].style.background='blue'
+paragraf[1].style.fontSize='50px'
+paragraf[2].style.border='1px solid red'
+paragraf[3].style.color='yellow'
+
+2. Select all paragraphs and loop through each elements and give the first and third paragraph a color of green, and the second and the fourth paragraph a red color
+
+const paragraf =document.querySelectorAll('p')
+
+paragraf.forEach((paragraf,i) => {
+
+ if(i % 2 ===0){
+ paragraf.style.backgroundColor='green'
+ }
+ else(paragraf.style.backgroundColor='red')
+
+})
+
+Set text content, id and class to each paragraph
+3.
+
+const paragraf =document.querySelectorAll('p')
+
+for(const par of paragraf){
+par.className='class'
+par.id='id'
+par.textContent='This is a paragraph '
+}
+
+### Exercise Level 3
+
+#### DOM: Mini project 1
+
+1. Develop the following application, use the following HTML elements to get started with. You will get the same code on starter folder. Apply all the styles and functionality using JavaScript only.
+
+ - The year color is changing every 1 second
+ - The date and time background color is changing every on seconds
+ - Completed challenge has background green
+ - Ongoing challenge has background yellow
+ - Coming challenges have background red
+
+```html
+
+
+
+
+ JavaScript for Everyone:DOM
+
+
+
+
Asabeneh Yetayeh challenges in 2020
+
30DaysOfJavaScript Challenge
+
+
30DaysOfPython Challenge Done
+
30DaysOfJavaScript Challenge Ongoing
+
30DaysOfReact Challenge Coming
+
30DaysOfFullStack Challenge Coming
+
30DaysOfDataAnalysis Challenge Coming
+
30DaysOfReactNative Challenge Coming
+
30DaysOfMachineLearning Challenge Coming
+
+
+
+
+```
+#### [Home](../README.md) | [<< Day 20](./20_day_cleanCode.md) | [Day 22 >>](./22_day_DOM2.md)
\ No newline at end of file
diff --git a/Exercise-Solutions/days/22_day_DOM2.md b/Exercise-Solutions/days/22_day_DOM2.md
new file mode 100644
index 0000000..6d85afd
--- /dev/null
+++ b/Exercise-Solutions/days/22_day_DOM2.md
@@ -0,0 +1,162 @@
+
+ # Day 22 - Dom 2
+
+
+## [Exercise:Solutions](#exercise-solutions)
+
+- ### [Exercise:Level 1](#exercises-level-1)
+- ### [Exercise:Level 2](#exercises-level-2)
+- ### [Exercise:Level 3](#exercises-level-3)
+
+
+ #### [Home](../README.md) | [<< Day 21](./21_day_DOM.md) | [Day 23 >>](./23_day_event.md)
+
+## Exercise Solutions
+
+### Exercise Level 1
+
+1. Create a div container on HTML document and create 100 to 100 numbers dynamically and append to the container div.
+- Even numbers background is green
+- Odd numbers background is yellow
+- Prime numbers background is red
+
+```js
+// app.js
+
+// Bir asal sayı olup olmadığını kontrol eden bir fonksiyon tanımlayın
+function isPrime(n) {
+ // 0 ve 1 asal sayı değildir
+ if (n === 0 || n === 1) {
+ return false;
+ }
+ // 2 asal sayının tek çiftidir
+ if (n === 2) {
+ return true;
+ }
+ // Çift sayılar asal sayı olamaz
+ if (n % 2 === 0) {
+ return false;
+ }
+ // 3'ten n'in kareköküne kadar olan tek sayılara bölünebilir mi diye bakın
+ let sqrt = Math.sqrt(n);
+ for (let i = 3; i <= sqrt; i += 2) {
+ if (n % i === 0) {
+ return false;
+ }
+ }
+ // Hiçbir sayıya bölünemiyorsa, asal sayıdır
+ return true;
+ }
+
+ // HTML'de bir tablo elemanı seçin
+ let table = document.getElementById("table");
+
+ // Tabloyu sıfırlayın
+ table.innerHTML = "";
+
+ // Satır ve sütun sayısını belirleyin
+ let rows = 17;
+ let cols = 6;
+
+ // Her satır için bir döngü başlatın
+ for (let i = 0; i < rows; i++) {
+ // Bir tablo satırı oluşturun
+
+ let tr = document.createElement("tr");
+
+ // Her sütun için bir döngü başlatın
+ for (let j = 0; j < cols; j++) {
+ // Bir tablo hücresi oluşturun
+ let td = document.createElement("td");
+
+ // Hücredeki sayıyı hesaplayın
+ let num = i * cols + j;
+
+ // Hücreye sayıyı yazın
+ td.textContent = num;
+
+ // Sayının rengini belirleyin
+ let color;
+ if (isPrime(num)) {
+ // Asal sayılar kırmızıdır
+ color = "red";
+ } else if (num % 2 === 0) {
+ // Çift sayılar yeşildir
+ color = "green";
+ } else {
+ // Tek sayılar sarıdır
+ color = "yellow";
+ }
+
+ // Hücrenin arka plan rengini ayarlayın
+ td.style.backgroundColor = color;
+
+ // Hücreyi satıra ekleyin
+ tr.appendChild(td);
+ }
+
+ // Satırı tabloya ekleyin
+ table.appendChild(tr);
+ }
+ ```
+
+### Exercised Level 2
+
+1. Use the countries array to display all the countries.See the design
+
+```js
+// app.js
+
+// Create an array of country names
+let countries = ["Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "Botswana", "Brazil", "Brunei", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon"];
+
+// Select a div element in HTML
+let div = document.getElementById("div");
+
+// Clear the div content
+div.innerHTML = "";
+
+// Set the number of rows and columns
+let rows = '6';
+let cols = '6';
+
+// Loop through each row
+for (let i = 0; i < rows; i++) {
+ // Create a paragraph element
+ let p = document.createElement("p");
+
+ // Loop through each column
+ for (let j = 0; j < cols; j++) {
+ // Get the index of the country in the array
+ let index = i * cols + j;
+
+ // Check if the index is valid
+ if (index < countries.length) {
+ // Get the country name
+ let country = countries[index];
+
+ // Create a span element
+ let span = document.createElement("span");
+
+ // Set the span content to the country name
+ span.textContent = country;
+
+ // Set the span style to have a border and some padding
+ span.style.border = "1px solid black";
+ span.style.padding = "5px";
+
+
+ // Append the span to the paragraph
+ p.appendChild(span);
+ }
+ }
+
+ // Append the paragraph to the div
+ div.appendChild(p);
+}
+```
+
+### Exercie Level 3
+
+
+ #### [Home](../README.md) | [<< Day 21](./21_day_DOM.md) | [Day 23 >>](./23_day_event.md)
\ No newline at end of file
diff --git a/Exercise-Solutions/days/23_day_event.md b/Exercise-Solutions/days/23_day_event.md
new file mode 100644
index 0000000..92451c5
--- /dev/null
+++ b/Exercise-Solutions/days/23_day_event.md
@@ -0,0 +1,109 @@
+# Day 23 - Event Listener
+
+## [Exercise:Solutions](#exercise-solutions)
+
+- ### [Exercise:Level 1](#exercises-level-1)
+
+#### [Home](../README.md) | [<< Day 22](./22_day_DOM2.md) | [Day 24 >>](../days/day_24/day_24.md)
+
+## Exercise Solutions
+
+### Exercise Level 1
+
+1. Generating numbers and marking evens, odds and prime numbers with three different colors. See the image below.
+```html
+// index.html
+
+
+
+
+
+ Sayıları Göster
+
+
+
+