Skip to content

Commit 8d7910e

Browse files
committed
Code 2 - Class 7
1 parent 5f40a17 commit 8d7910e

2 files changed

Lines changed: 158 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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>Document</title>
7+
</head>
8+
<body>
9+
10+
<!-- <script>
11+
const a = 12
12+
</script> ❌ -->
13+
<script src="./js/script.js"></script>
14+
</body>
15+
</html>
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
"use strict";
2+
3+
// console.log("Hello!");
4+
5+
// Javascript types
6+
// 1. Number
7+
// 2. String
8+
// 3. Boolean
9+
// 4. Undefined
10+
// 5. Null
11+
// 6. Symbol
12+
// 7. Object
13+
14+
// ---------------------------
15+
16+
// 1. Number
17+
// console.log(19);
18+
// console.log("19");
19+
// console.log(Number("131"));
20+
// console.log(Number("Hello")); // NaN = Not a Number
21+
22+
// ---------------------------
23+
24+
// 2. String
25+
// console.log("Hello World!");
26+
// console.log("Hello World!");
27+
// console.log("There's No one Here");
28+
// console.log("There's No one Here");
29+
30+
// ---------------------------
31+
32+
// 3. Boolean
33+
true; // 1
34+
false; // 0
35+
36+
// console.log(true);
37+
// console.log(false);
38+
39+
// ---------------------------
40+
41+
// console.log("Hello World!");
42+
// console.log("Hello World!");
43+
// console.log("Hello World!");
44+
// console.log("Hello World!");
45+
// console.log("Hello World!");
46+
// console.log("Hello World!");
47+
// console.log("Hello World!");
48+
// console.log("Hello World!");
49+
50+
// var name
51+
// let name
52+
// const name
53+
54+
// var fName = "Amin";
55+
var age = 19;
56+
var description =
57+
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.";
58+
59+
// console.log(description);
60+
// console.log("Hello My name is " + fName + " And i'm " + age + " I do " + description)
61+
// console.log(`Hello My name is ${fName}`)
62+
// - , + , / , * , %
63+
// **
64+
65+
// let & const
66+
67+
// var text = "Hello World!"
68+
// var text = "dvheqwoihvek"
69+
70+
// console.log(text)
71+
72+
const idNumber = "0912345678";
73+
74+
// let fName = "Amin";
75+
76+
// idNumber = "1343214"
77+
78+
// fName = "Amir";
79+
80+
// console.log(fName)
81+
82+
// let amin&ali
83+
// let 2141amin = "ascwa"
84+
let amin131 = "123";
85+
86+
// let _name
87+
88+
// let $name
89+
90+
// "hello-world"
91+
// "hello_world"
92+
93+
// let my_text;
94+
95+
// let MyText;
96+
97+
// let myTextIsHere;
98+
99+
// console.log(my_text)
100+
// console.log(myTextIsHere)
101+
102+
// var text = "Hello"
103+
// console.log(text)
104+
// var text = "Hello2"
105+
// console.log(text)
106+
// var text;
107+
// console.log(text)
108+
109+
// var text2;
110+
// console.log(text2)
111+
112+
let b = 7;
113+
let a = 1;
114+
// console.log(a);
115+
a = b;
116+
// console.log("a:", a);
117+
// console.log("b:", b);
118+
119+
a = "Hello world!";
120+
// console.log(a);
121+
122+
const c = 15;
123+
// c = 10 ❌
124+
125+
const number2 = 1;
126+
const string = "Batman";
127+
const boolean = true;
128+
129+
// console.log(typeof number2)
130+
// console.log(typeof string)
131+
// console.log(typeof boolean)
132+
// console.log(typeof NaN)
133+
134+
// let fName = prompt("Enter You'r name","Amin")
135+
// console.log(fName);
136+
137+
let firstNumber = +prompt("Enter first Number");
138+
let secondNumber = +prompt("Enter second Number");
139+
let lastNumber = +prompt("Enter last Number");
140+
141+
const sum = firstNumber + secondNumber + lastNumber;
142+
143+
console.log(sum);

0 commit comments

Comments
 (0)