Skip to content

Commit 60265cf

Browse files
authored
update variable
1 parent a5ec300 commit 60265cf

6 files changed

Lines changed: 110 additions & 12 deletions

File tree

Example/Basic/index.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
<!-- add external js file -->
9+
10+
<script src="index.js"></script>
11+
12+
<script>
13+
console.log("www.codeswithpankaj.com");
14+
document.write("codeswithpankaj.com")
15+
16+
</script>
17+
18+
</head>
19+
<body>
20+
21+
</body>
22+
</html>

Example/Basic/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log("p4n.in")

Example/Variable/Variable.html

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,12 @@
77
<script>
88

99
var name = "joy"
10-
document.write(name+"<br>")
11-
let age = 23
12-
document.write(age+"<br>")
10+
var age = 12
11+
var height = 4.5
1312

14-
height = 4.5;
15-
document.write(height+"<br>")
16-
17-
height = 3.4;
18-
document.write(height+"<br>")
19-
const number = 9.8
20-
document.write(number+"<br>")
21-
number = 9.6
22-
document.write(number+"<br>")
13+
console.log("your name is : ",name);
14+
console.log("your age is : ",age);
15+
console.log("your height is : ",height);
2316

2417
</script>
2518
</head>

Example/Variable/Variable1.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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>@p4n.in</title>
7+
<script>
8+
9+
name = "joy"
10+
age = 12
11+
height = 4.5
12+
13+
console.log("your name is : ",name);
14+
console.log("your age is : ",age);
15+
console.log("your height is : ",height);
16+
17+
</script>
18+
</head>
19+
<body>
20+
21+
</body>
22+
</html>

Example/Variable/Variable2.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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>@p4n.in</title>
7+
<script>
8+
9+
let name = "joy"
10+
let age = 12
11+
let height = 4.5
12+
13+
console.log("your name is : ",name);
14+
console.log("your age is : ",age);
15+
console.log("your height is : ",height);
16+
17+
18+
</script>
19+
</head>
20+
<body>
21+
22+
</body>
23+
</html>

Example/Variable/Variable3.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
number = 90
11+
12+
console.log(number)
13+
14+
number = 900
15+
16+
console.log(number)
17+
18+
// constant variable.
19+
20+
const num = 450;
21+
22+
console.log(num)
23+
24+
num = 900
25+
26+
27+
28+
</script>
29+
30+
</head>
31+
<body>
32+
33+
34+
35+
36+
</body>
37+
</html>

0 commit comments

Comments
 (0)