Skip to content

Commit 09f1445

Browse files
committed
01
1 parent b817a1e commit 09f1445

File tree

3 files changed

+49
-4
lines changed

3 files changed

+49
-4
lines changed

Practice-01

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
//Q1
2+
3+
let num="123";
4+
let res=num+2; //1232
5+
let res1=+num+2; //125
6+
console.log(res);
7+
console.log(res1);
8+
9+
//Q2
10+
11+
console.log(typeof res);
12+
console.log(typeof res1);
13+
14+
//Q3
15+
16+
const a="raghav";
17+
18+
// a="raghav"; //try to changes but giv error
19+
console.log(a);
20+
21+
//Q4
22+
23+
const student={
24+
'name':'nandini',
25+
branch:'IT',
26+
sem:1,
27+
};
28+
29+
console.log(student);
30+
31+
//Q5:
32+
33+
const mean={
34+
Immigrant:"प्रवासी",
35+
Gossip:"गपशप",
36+
Spark:"चिंगारी",
37+
Vanish:"गायब होना",
38+
Passenger:"यात्री",
39+
}
40+
// console.log(mean);
41+
42+
for(let ele in mean){
43+
console.log(mean[ele]);
44+
}

Set_In_JS.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
let dist=new Set();
1+
let dist = new Set();
22

33
dist.add(5);
44
dist.add(4);
55
dist.add(2);
66
dist.add(1);
77
dist.add(10);
88

9-
let nums=[1,2,3,4,5,6,7,8,9]
9+
let nums = [1, 2, 3, 4, 5, 6, 7, 8, 9];
1010

11-
nums.forEach((x)=>{
12-
dist.add(x);
11+
nums.forEach((x) => {
12+
dist.add(x);
1313
});
1414

1515
console.log(dist);

tempCodeRunnerFile.javascript

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2

0 commit comments

Comments
 (0)