Skip to content

Commit 0a8c514

Browse files
committed
Day 29
1 parent d49a4af commit 0a8c514

File tree

4 files changed

+71
-0
lines changed

4 files changed

+71
-0
lines changed

Day 29/css/style.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.special-heading {
2+
background: slateblue;
3+
color: white;
4+
font-size: 30px;
5+
margin: 25px;
6+
}

Day 29/index.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>JavaScript Tutorial</title>
7+
<link rel="stylesheet" href="./css/style.css" />
8+
</head>
9+
<body>
10+
<h1 class="main-heading">Welcome to this otaku kingdom</h1>
11+
<p class="sub-heading">You can find different types of anime here.</p>
12+
<input id="entered-anime" type="text" placeholder="Enter anime name" />
13+
<button id="add-anime">Anime Button</button>
14+
<ul id="anime-list">
15+
<li>One piece</li>
16+
<li>Naruto</li>
17+
<li>One Punch Man</li>
18+
<li>Dr. Stone</li>
19+
<li>Haikyuu</li>
20+
<li>Boku no hero academia</li>
21+
</ul>
22+
<script src="./js/script.js"></script>
23+
</body>
24+
</html>

Day 29/js/script.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// console.log('Welcome to day 29')
2+
// console.log('Refactor our last tutorial code')
3+
4+
// var ul = document.getElementById('anime-list')
5+
// var animeName = document.getElementById('entered-anime')
6+
// var addAnime = document.getElementById('add-anime')
7+
8+
// function inputLengthCheck(input) {
9+
// return input.value.length
10+
// }
11+
12+
// function createListElement(item) {
13+
// var li = document.createElement('li')
14+
// li.appendChild(document.createTextNode(item.value))
15+
// ul.appendChild(li)
16+
// item.value = ''
17+
// }
18+
19+
// function addAnimeInList() {
20+
// if (inputLengthCheck(animeName) > 0) {
21+
// createListElement(animeName)
22+
// }
23+
// }
24+
25+
// addAnime.addEventListener('click', addAnimeInList)
26+
27+
function getPersonInfo(one, two, three) {
28+
console.log(one)
29+
console.log(two)
30+
console.log(three)
31+
// console.log(four)
32+
}
33+
34+
const person = 'Lydia'
35+
const age = 21
36+
37+
getPersonInfo`${person} is ${age} years old`

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,7 @@ Day 27
117117
Day 28
118118
```
119119
* [Day 28](https://blog.nerdjfpb.com/javascript-part-28/) - Add New Anime on The List Using Event
120+
```
121+
Day 29
122+
```
123+
* [Day 29](https://blog.nerdjfpb.com/javascript-part-29/) - Refactor our last tutorial code

0 commit comments

Comments
 (0)