-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.html
44 lines (39 loc) · 976 Bytes
/
main.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>TypeScript Studying</title>
</head>
<body>
<h2>Modules in TypeScript</h2>
<script>
let message = "Modules loaded";
function helloPage() {
console.log("Hello from page");
}
function sum(a, b) {
return a + b;
}
const tom = {
name: "Tommy",
age: 27,
print() {
console.log(`${this.name} is ${this.age} years old.`)
}
}
let points = [{x: 1, y: 2},
{x: 5, y: 7},
{x: 3, y: 9}];
class Person {
constructor(name, age) {
this.name = name;
this.age = age;
}
display() {
console.log(this.name, this.age);
}
}
</script>
<script type="module" src="main.js"></script>
</body>
</html>