-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathObjects.html
More file actions
24 lines (24 loc) · 747 Bytes
/
Objects.html
File metadata and controls
24 lines (24 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=<device-width>, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
//objects in js
const item={
"aditya": 10,
"prasad": false
}
console.log(item["aditya"])
var name1="aditya";
var name2="prasad";
// string object
var name3= new String("aditya"); // 2 objects cannot be compared always returns false
document.write(name1===name2); //strict eqality operator compares the va;ue shoul be equal as well as the type should also be equal
</script>
</body>
</html>