-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path005_Chapter1_PS.js
More file actions
36 lines (27 loc) · 808 Bytes
/
Copy path005_Chapter1_PS.js
File metadata and controls
36 lines (27 loc) · 808 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
// Chapter 1 - Q1
let a = "Abhishek";
let b = 6;
console.log(a + b); //Abhishek6
// Chapter 1 - Q2
console.log(typeof (a+b)); //string
// Chapter 1 - Q3
const a1 = {
name: "Abhishek",
section: 1,
isPrinciple: false,
}
// a1 = "Prabhat" //Assignment to constant variable
// Chapter 1 - Q4
// a1 ={} Assignment to constant variable
a1['friend'] = "Prabhat";
console.log(a1);
a1['name'] = "Abhi";
console.log(a1) //{ name: 'Abhi', section: 1, isPrinciple: false, friend: 'Pooja' }
// Chapter 1 - Q5
const dict = {
appreciate: "to recognize the full worth of",
bazaar: "a marketplace or shopping quarter",
yakka: "especially hard work"
}
console.log(dict.yakka); //especially hard work
console.log(dict['yakka']); //especially hard work