Skip to content

Commit e077d1d

Browse files
committed
Add new HTML files for basic programming concepts, including variables and data types, with improved examples and structure.
1 parent d512bc5 commit e077d1d

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed

Example/Lectures/01 Day/Basic.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
8+
<script>
9+
10+
console.log("Welcome to codes with pankaj..."); // output in console
11+
document.write("welcome to codeswithpankaj"); // output in HTML
12+
13+
14+
</script>
15+
16+
17+
</head>
18+
<body>
19+
20+
</body>
21+
</html>
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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+
12+
x = 100
13+
14+
document.write(x);
15+
document.write("<br>hello");
16+
document.write("<br>",454545);
17+
18+
// example :
19+
20+
name = "joy";
21+
const age = 23; // constant variable.
22+
height = 4.5;
23+
24+
document.write("<hr>Your Name is : ",name);
25+
document.write("<hr>Your age is : ",age);
26+
document.write("<hr>Your height is : ",height);
27+
28+
//age = 45;
29+
//document.write("<hr>Your age is : ",age);
30+
31+
let numbers = 800
32+
document.write("<hr>",numbers)
33+
34+
const data = {
35+
name:"joy",
36+
age:23,
37+
height:45
38+
}
39+
40+
// print variable (object)
41+
42+
document.write("<hr>Your Name is : ",data.name);
43+
document.write("<hr>Your age is : ",data.age);
44+
document.write("<hr>Your height is : ",data.height);
45+
document.write("<hr>all : ",data);
46+
47+
my_data = [45,56,78,89,22]
48+
49+
document.write("<hr>all : ",my_data);
50+
document.write("<hr>One : ",my_data[4]);
51+
52+
53+
54+
</script>
55+
56+
</body>
57+
</html>

0 commit comments

Comments
 (0)