-
Notifications
You must be signed in to change notification settings - Fork 0
/
01-indexjs.html
119 lines (99 loc) · 3.14 KB
/
01-indexjs.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<!-- <button onclick="regiterme()">Register</button> -->
<button onclick="alertme()">click</button>
<!-- <script src="./script.js"></script> -->
<script>
var value1 = true;
var value2 = 8;
var value3 = "welcome";
var value4 = ["Gingee", 0, true, "chennai", "selam", "Gingee", 0, true, "chennai", "selam", "chennai", "selam", "Gingee"];
var students = [
{
"id": 101,
"name": "Raj",
"city": "Chennai"
},
{
"id": 102,
"name": "Bala",
"city": "Chennai"
},
{
"id": 101,
"name": "Kumar",
"city": "Selam"
}
];
console.log(typeof value1)
console.log(typeof value2)
console.log(typeof value3)
console.log(typeof value4)
console.log(typeof students)
console.log(value3);
console.log(typeof value4[2]);
console.log(value4.length);
console.log(value4[(value4.length) - 1]);
console.log(students);
console.log(students[0]);
console.log(students[0].id);
console.log(students[0].name);
console.log(students[0].city);
var a=10;
var b=10;
var c="10"
console.log(a==b);
console.log(a==c);
console.log(a===c);
console.log(a>b);
console.log(a>=b);
console.log(a<b);
console.log(a<=b);
console.log(a!=c);
console.log(a!==c);
console.log('******************');
console.log((a==b)&&(a==c));
console.log((a==b)&&(a===c));
console.log('******************');
console.log((a==b)||(a==c));
console.log((a==b)||(a===c));
console.log('******************');
console.log(a+b);
console.log(a-b);
console.log(a*b);
console.log(a/b);
console.log(a%b);
console.log('******************');
var mycourse = "I am learning Javascript, I am learning React, I am learning Java !!!! "
var fname = "Raja "
var lname = "Raman"
console.log(mycourse.length);
console.log(mycourse.toUpperCase());
console.log(mycourse.toLowerCase());
console.log(mycourse.slice(3,13));
console.log(mycourse.slice(14,24));
console.log(fname.concat(lname));
console.log(mycourse.replace("Javascript", "React js"));
console.log(mycourse.includes("am"));
console.log(mycourse.includes("ami"));
console.log(mycourse.includes("Java"));
console.log(fname.repeat(5));
console.log(mycourse.charAt(14));
console.log(mycourse.charCodeAt(15));
// console.log(String.fromCharCode(74));
console.log(mycourse.substr(3,10));
console.log(mycourse.slice(3,10));
console.log(mycourse.startsWith("I"));
console.log(mycourse.endsWith("a"));
console.log(mycourse.split(""));
console.log(mycourse.split(" "));
console.log(mycourse.split(","));
</script>
</body>
</html>