-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathP1.js
More file actions
38 lines (38 loc) · 870 Bytes
/
P1.js
File metadata and controls
38 lines (38 loc) · 870 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//Q-1
let a = "Dimple"
let b = 8
console.log(a + b);
//Q-2
console.log(typeof (a+b));
//Q-3
const M = {
number: 24,
letter: 'A'
};
M.number = 100;
M.letter = 'B';
console.log(M);
console.log(M.number);
console.log(M.letter);
//Q-4
const add = {
name : "Dimple",
Course : "CE",
sem : 4
}
add['Bro'] = "Sharv"
add['Sis'] = "Sweety"
console.log(add);
//Q-5
const dict = {
apple: "A sweet fruit that grows on trees.",
computer: "An electronic device for processing data.",
ocean: "A vast body of salt water that covers most of the Earth.",
mountain: "A large natural elevation of the Earth's surface.",
book: "A set of written or printed pages bound together."
}
console.log(dict['apple'])
console.log(dict['computer'])
console.log(dict['ocean'])
console.log(dict['mountain'])
console.log(dict['book'])