Skip to content

Commit 8e61492

Browse files
committed
Add JavaScript Objects example and corresponding HTML file
1 parent 13dc0c9 commit 8e61492

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// object
2+
3+
const Days = {
4+
Day1:"Monday",
5+
Day2:"Tuesday"
6+
}
7+
8+
9+
console.log("Days ",Days);
10+
console.log("Days ",Days.Day1);
11+
12+
13+
class info{
14+
15+
Print_Data() {
16+
17+
console.log("This is Demo ... Data ")
18+
19+
}
20+
21+
22+
}
23+
24+
obj = new info
25+
26+
obj.Print_Data();
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
<script src="JavaScript Objects.js"></script>
8+
</head>
9+
<body>
10+
11+
</body>
12+
</html>

0 commit comments

Comments
 (0)