Skip to content

Commit 5b323b6

Browse files
committed
My First Commit
0 parents  commit 5b323b6

File tree

4 files changed

+68
-0
lines changed

4 files changed

+68
-0
lines changed

README.md

30 Bytes

JavaScript

index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
<link rel="stylesheet" href="src/style.css">
7+
<title id="titl"></title>
8+
</head>
9+
<body>
10+
<h1 id="header"></h1>
11+
<p id="bio">Click the following button! </p>
12+
<!--nput type = "button" onclick = "MyFunc()" value = "Click">-->
13+
14+
<script src="src/main.js"></script>
15+
</body>
16+
</html>

src/main.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
const message = 'Hello world' // Try edit me
2+
const title ='Akele Belay Walelign'
3+
4+
// Update header text
5+
document.querySelector('#header').innerHTML = message
6+
document.getElementById('titl').innerHTML = title
7+
8+
// Log to console
9+
console.log(message)
10+
11+
// variables
12+
13+
// let a;
14+
// a = 1997
15+
// a = "Akele"
16+
// console.log(typeof a)
17+
18+
/* MyFunc = () => {
19+
document.getElementById("bio").innerHTML = "my name is Akele Belay Walelgign"
20+
console.log("my name is Akele Belay Walelgign")
21+
let birthYear = 1997
22+
console.log(birthYear)
23+
var year=1998
24+
} */
25+
//MyFunc()
26+
// console.log(year)
27+
28+
// var age = 100;
29+
// if (age > 12){
30+
// var dogYears = age * 7;
31+
// console.log(`You are ${dogYears} dog years old!`);
32+
// }
33+
// console.log(dogYears) it works because var is a function scoped not block scoped
34+
35+
// var age = 100;
36+
// if (age > 12){
37+
// let dogYears = age * 7;
38+
// //console.log("You are", dogYears, "dog years old!");
39+
// console.log(`You are ${dogYears} dog years old!`);
40+
// }
41+
//console.log(dogYears) err- let is a blockscoped
42+
43+

src/style.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
body {
2+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
3+
color: #710dce;
4+
background-color: transparent;
5+
height: 100vh;
6+
display: flex;
7+
justify-content: center;
8+
align-items: center;
9+
}

0 commit comments

Comments
 (0)