Skip to content

Commit 5713a23

Browse files
committed
day 20
1 parent 55d651a commit 5713a23

File tree

6 files changed

+55
-53
lines changed

6 files changed

+55
-53
lines changed

11_Day/11_day_destructuring_and_spread.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,11 +601,15 @@ const users = [
601601
### Exercises: Level 3
602602

603603
1. Destructure the countries object print name, capital, population and languages of all countries
604-
2. A junior developer structure student name, skills and score in array of arrays which may not easy to read. Destruction the following array name to name, skills array to skills, scores array to scores, JavaScript score to jsScore and React score to reactScore variable.
604+
2. A junior developer structure student name, skills and score in array of arrays which may not easy to read. Destructure the following array name to name, skills array to skills, scores array to scores, JavaScript score to jsScore and React score to reactScore variable in one line.
605605

606606
```js
607607
const student = ['David', ['HTM', 'CSS', 'JS', 'React'], [98, 85, 90, 95]]
608-
console.log(name, skills, scores, jsScore, reactScore)
608+
console.log(name, skills, jsScore, reactScore)
609+
```
610+
611+
```sh
612+
David (4) ["HTM", "CSS", "JS", "React"] 90 95
609613
```
610614

611615
3. Write a function called *convertArrayToObject* which can convert the array to a structure object.

12_Day/12_day_regular_expressions.md

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -454,47 +454,45 @@ distance = 12
454454
```
455455

456456
```sh
457-
[(6, 'love'),
458-
(5, 'you'),
459-
(3, 'can'),
460-
(2, 'what'),
461-
(2, 'teaching'),
462-
(2, 'not'),
463-
(2, 'else'),
464-
(2, 'do'),
465-
(2, 'I'),
466-
(1, 'which'),
467-
(1, 'to'),
468-
(1, 'the'),
469-
(1, 'something'),
470-
(1, 'if'),
471-
(1, 'give'),
472-
(1, 'develop'),
473-
(1, 'capabilities'),
474-
(1, 'application'),
475-
(1, 'an'),
476-
(1, 'all'),
477-
(1, 'Python'),
478-
(1, 'If')
479-
]
457+
[{'love':6},
458+
{'you':5},
459+
{'can':3},
460+
{'what':2},
461+
{'teaching':2},
462+
{'not':2},
463+
{'else':2},
464+
{'do':2},
465+
{'I':2},
466+
{'which':1},
467+
{'to':1},
468+
{'the':1},
469+
{'something':1},
470+
{'if':1},
471+
{'give':1},
472+
{'develop':1},
473+
{'capabilities':1},
474+
{'application':1},
475+
{'an':1},
476+
{'all':1},
477+
{'Python':1},
478+
{'If':1}]
480479
```
481480

482481
```js
483482
console.log(tenMostFrequentWords(paragraph, 10))
484483
```
485484

486485
```sh
487-
[ (6, 'love'),
488-
(5, 'you'),
489-
(3, 'can'),
490-
(2, 'what'),
491-
(2, 'teaching'),
492-
(2, 'not'),
493-
(2, 'else'),
494-
(2, 'do'),
495-
(2, 'I'),
496-
(1, 'which')
497-
]
486+
[{'love':6},
487+
{'you':5},
488+
{'can':3},
489+
{'what':2},
490+
{'teaching':2},
491+
{'not':2},
492+
{'else':2},
493+
{'do':2},
494+
{'I':2},
495+
{'which':1}]
498496
```
499497

500498
### Exercises: Level 3

20_Day/12_day_starter/index.html

Lines changed: 0 additions & 17 deletions
This file was deleted.

20_Day/19_day_starter/index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<title>30DaysOfJavaScript:19 Day </title>
6+
</head>
7+
8+
<body>
9+
<h1>30DaysOfJavaScript:19 Day</h1>
10+
<h2>Writing clean code</h2>
11+
12+
13+
<script src="./scripts/main.js"></script>
14+
15+
</body>
16+
17+
</html>

0 commit comments

Comments
 (0)