Skip to content

Commit d12e567

Browse files
committed
JavaScript Over
1 parent ed3f5ae commit d12e567

File tree

71 files changed

+9707
-3688
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+9707
-3688
lines changed

Ch 1 Practice Set.js

Lines changed: 71 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,72 @@
1-
//Ch 1 Variable -> Practice Set
2-
3-
// Q1) Create a Variable of Type String And try To Add a Number To It.
4-
5-
6-
let a = "Darshan";
7-
let b = 10;
8-
9-
console.log(a + b);
10-
11-
// Output: Darshan10
12-
13-
14-
// Q2) Use typeof Operator To Find Data-type of the First Question of the Last Answer.
15-
16-
17-
console.log(typeof (a + b));
18-
19-
// Output: String
20-
21-
22-
// Q3) Create a Const Object in JavaScript. Can You Change It to Hold A Number Latter?
23-
24-
25-
const c = {
26-
name: "Darshan",
27-
author: "CrptoMinds",
28-
isPrincipal: false
29-
}
30-
31-
c = 1;
32-
// Output: Assignment to Constant Variable -> Ans Is No
33-
34-
35-
// Q4) Try To Add a New Key In Q3 Const Object. Were You Able To Do It?
36-
37-
38-
const c1 = {
39-
name: "Darshan",
40-
author: "CrptoMinds",
41-
isPrincipal: false
42-
}
43-
44-
c1['friend'] = "Krupali";
45-
46-
//const c1 -> Point Object -> We Can Change Value Inside The Object -> We Can't Make New c1 Objact Again -> Because Of Constant
47-
console.log(c1);
48-
49-
// Output:
50-
// {
51-
// name: 'Darshan',
52-
// author: 'CrptoMinds',
53-
// isPrincipal: false,
54-
// friend: 'Krupali'
55-
// }
56-
57-
58-
// Q4) Write A JS Program To Create a Word-Meaning Dictionary Of 5 Words.
59-
60-
61-
const dict = {
62-
appreciate: "recognize the full worth of ",
63-
ataraxia: "a state of freedom from emotional disturbance",
64-
yakka: "Work, especially hard work."
65-
66-
}
67-
68-
console.log(dict.yakka);
69-
console.log(dict['yakka']);
70-
71-
// Output: Work, especially hard work.
1+
//Ch 1 Variable -> Practice Set
2+
3+
// Q1) Create a Variable of Type String And try To Add a Number To It.
4+
5+
6+
let a = "Darshan";
7+
let b = 10;
8+
9+
console.log(a + b);
10+
11+
// Output: Darshan10
12+
13+
14+
// Q2) Use typeof Operator To Find Data-type of the First Question of the Last Answer.
15+
16+
17+
console.log(typeof (a + b));
18+
19+
// Output: String
20+
21+
22+
// Q3) Create a Const Object in JavaScript. Can You Change It to Hold A Number Latter?
23+
24+
25+
const c = {
26+
name: "Darshan",
27+
author: "CrptoMinds",
28+
isPrincipal: false
29+
}
30+
31+
c = 1;
32+
// Output: Assignment to Constant Variable -> Ans Is No
33+
34+
35+
// Q4) Try To Add a New Key In Q3 Const Object. Were You Able To Do It?
36+
37+
38+
const c1 = {
39+
name: "Darshan",
40+
author: "CrptoMinds",
41+
isPrincipal: false
42+
}
43+
44+
c1['friend'] = "Krupali";
45+
46+
//const c1 -> Point Object -> We Can Change Value Inside The Object -> We Can't Make New c1 Objact Again -> Because Of Constant
47+
console.log(c1);
48+
49+
// Output:
50+
// {
51+
// name: 'Darshan',
52+
// author: 'CrptoMinds',
53+
// isPrincipal: false,
54+
// friend: 'Krupali'
55+
// }
56+
57+
58+
// Q4) Write A JS Program To Create a Word-Meaning Dictionary Of 5 Words.
59+
60+
61+
const dict = {
62+
appreciate: "recognize the full worth of ",
63+
ataraxia: "a state of freedom from emotional disturbance",
64+
yakka: "Work, especially hard work."
65+
66+
}
67+
68+
console.log(dict.yakka);
69+
console.log(dict['yakka']);
70+
71+
// Output: Work, especially hard work.
7272
// Work, especially hard work.

0 commit comments

Comments
 (0)