-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathP3.js
More file actions
36 lines (34 loc) · 713 Bytes
/
P3.js
File metadata and controls
36 lines (34 loc) · 713 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
//Q-1
let marks = {
Dimple : 100,
Sharv : 99,
Sweety : 98,
Mansi : 97,
}
for(let i=0;i<Object.keys(marks).length;i++){
console.log("The marks of " + Object.keys(marks)[i] + " are " + marks[Object.keys(marks)[i]])
}
//Q-2
let marks1 = {
Dimple: 100,
Sharv: 99,
Sweety: 98,
Mansi: 97,
};
for (let i in marks1) {
console.log("The marks of " + i + " are " + marks1[i]);
}
console.log("Hii,Hello...");
//Q-3
let n = 3;
let i;
while(i != n){
// i = prompt("Enter a number:")
i = 3
}
console.log("You have enterd a correct Number..");
//Q-4
const mean = (x,y,z,w,a)=>{
return (x+ y+ z+ w+ a)/4
}
console.log(mean(3,6,7,8,8));