Fixed some major issues

pull/233/head
Keshav Bohra 4 years ago
parent 97f84bf65f
commit 6f95fada33

@ -14,7 +14,7 @@ let pattern = /love/gi
console.log(string.match(pattern)) // ["love", "love", "love"]
// Let us extract numbers from text using regular expression. This is not regular expression section, no panic.
let txt = 'In 2019, I run 30 Days of Pyhton. Now, in 2020 I super exited to start this challenge'
let txt = 'In 2019, I run 30 Days of Python. Now, in 2020 I super exited to start this challenge'
let regEx = /\d/g // d with escape character means d not a normal d instead acts a digit
// + means one or more digit numbers,
// if there is g after that it means global, search everywhere.

@ -1,5 +1,5 @@
// split(): The split method splits a string at a specified place.
let string = '30 Days Of JavaScipt'
let string = '30 Days Of JavaScript'
console.log(string.split()) // ["30 Days Of JavaScript"]
console.log(string.split(' ')) // ["30", "Days", "Of", "JavaScript"]
let firstName = 'Asabeneh'

@ -31,7 +31,7 @@
- [Increment Operator](#increment-operator)
- [Decrement Operator](#decrement-operator)
- [Ternary Operators](#ternary-operators)
- [Operator Precendence](#operator-precendence)
- [Operator Precedence](#operator-precendence)
- [Window Methods](#window-methods)
- [Window alert() method](#window-alert-method)
- [Window prompt() method](#window-prompt-method)
@ -333,9 +333,9 @@ number > 0
-5 is a negative number
```
### Operator Precendence
### Operator Precedence
I would like to recommend you to read about operator precendence from this [link](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence)
I would like to recommend you to read about operator precedence from this [link](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence)
## Window Methods

@ -279,7 +279,7 @@ isRaining
### Exercises: Level 1
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 neds to turn 18.
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

@ -524,7 +524,7 @@ Now it is time to express your thoughts about the Author and 30DaysOfJavaScript.
9. Density of a substance is calculated as follows:_density= mass/volume_. Write a function which calculates _density_.
10. Speed is calculated by dividing the total distance covered by a moving object divided by the total amount of time taken. Write a function which calculates a speed of a moving object, _speed_.
11. Weight of a substance is calculated as follows: _weight = mass x gravity_. Write a function which calculates _weight_.
12. Temperature in oC can be converted to oF using this formula: _oF = (oC x 9/5) + 32_. Write a function which convert oC to oF _convertCelciusToFahrenheit_.
12. Temperature in oC can be converted to oF using this formula: _oF = (oC x 9/5) + 32_. Write a function which convert oC to oF _convertCelsiusToFahrenheit_.
13. Body mass index(BMI) is calculated as follows: _bmi = weight in Kg / (height x height) in m2_. Write a function which calculates _bmi_. BMI is used to broadly define different weight groups in adults 20 years old or older.Check if a person is _underweight, normal, overweight_ or _obese_ based the information given below.
- The same groups apply to both men and women.

@ -134,7 +134,7 @@ In JavaScript we can execute some activities in a certain interval of time or we
- setInterval
- setTimeout
#### Setting Interaval using a setInterval function
#### Setting Interval using a setInterval function
In JavaScript, we use setInterval higher order function to do some activity continuously with in some interval of time. The setInterval global method take a callback function and a duration as a parameter. The duration is in milliseconds and the callback will be always called in that interval of time.

@ -71,8 +71,8 @@ const languages = [
'French',
]
const setOfLangauges = new Set(languages)
console.log(setOfLangauges)
const setOfLanguages = new Set(languages)
console.log(setOfLanguages)
```
```sh
@ -92,9 +92,9 @@ const languages = [
'French',
]
const setOfLangauges = new Set(languages)
const setOfLanguages = new Set(languages)
for (const language of setOfLangauges) {
for (const language of setOfLanguages) {
console.log(language)
}
```

@ -113,7 +113,7 @@ throw new Error('Required') // generates an error object with the message of Req
```
```js
const throwErroExampleFun = () => {
const throwErrorExampleFun = () => {
let message
let x = prompt('Enter a number: ')
try {
@ -126,7 +126,7 @@ const throwErroExampleFun = () => {
console.log(err)
}
}
throwErroExampleFun()
throwErrorExampleFun()
```
### Error Types

@ -305,7 +305,7 @@ class Person {
const fullName = this.firstName + ' ' + this.lastName
return fullName
}
get getscore() {
get getScore() {
return this.score
}
get getSkills() {

@ -440,7 +440,7 @@ const user = {
country: 'Finland',
city: 'Helsinki',
email: 'alex@alex.com',
skills: ['HTML', 'CSS', 'JavaScript', 'React', 'Pyhton'],
skills: ['HTML', 'CSS', 'JavaScript', 'React', 'Python'],
age: 250,
isLoggedIn: false,
points: 30

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

@ -202,7 +202,7 @@ for(let i = 0; i < len; i++){
// iterating an array using for of
for( const name of names) {
console.log(name.toUpperCasee())
console.log(name.toUpperCases())
}
// iterating array using forEach

@ -1,5 +1,5 @@
<div align="center">
<h1> 30 Days Of JavaScript: World Countrires Data Visualization</h1>
<h1> 30 Days Of JavaScript: World Countries Data Visualization</h1>
<a class="header-badge" target="_blank" href="https://www.linkedin.com/in/asabeneh/">
<img src="https://img.shields.io/badge/style--5eba00.svg?label=LinkedIn&logo=linkedin&style=social">
</a>
@ -14,7 +14,7 @@
</div>
[<< Day 24](../24_Day_Project_soloar_system/24_day_project_soloar_system.md) | [Day 26 >>](../26_Day_World_countries_data_visualization_2/26_day_world_countries_data_visualization_2.md)
[<< Day 24](../24_Day_Project_solar_system/24_day_project_solar_system.md) | [Day 26 >>](../26_Day_World_countries_data_visualization_2/26_day_world_countries_data_visualization_2.md)
![Thirty Days Of JavaScript](../images/banners/day_1_25.png)
@ -36,4 +36,4 @@
🎉 CONGRATULATIONS ! 🎉
[<< Day 24](../24_Day_Project_soloar_system/24_day_project_soloar_system.md) | [Day 26 >>](../26_Day_World_countries_data_visualization_2/26_day_world_countries_data_visualization_2.md)
[<< Day 24](../24_Day_Project_solar_system/24_day_project_solar_system.md) | [Day 26 >>](../26_Day_World_countries_data_visualization_2/26_day_world_countries_data_visualization_2.md)

@ -39,7 +39,7 @@
1. Create the following animation using (HTML, CSS, JS)
![Countries daata](./../images/projects/dom_mini_project_countries_object_day_10.1.gif)
![Countries data](./../images/projects/dom_mini_project_countries_object_day_10.1.gif)
2. Validate the following form using regex.

Loading…
Cancel
Save