-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJS_loop_FOR_in.js
68 lines (46 loc) · 843 Bytes
/
JS_loop_FOR_in.js
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
let person={Fname:"Abdul Rehman",lname:"JAmi",Age:21};
let text="";
for(let x in person)
{
text +=x+" : "+person[x]+" . ";
}
console.log(text);
const s=[21,23,22,77,21];
let text1="";
for(let x in s)
{
text1 +=s[x]+" _ ";
}
console.log(text1);
const y=[54,23,64,24];
let text2 ="";
y.forEach(disply);
function disply(value)
{
text2 +=value+"_";
}
console.log(text2);
=======
let person={Fname:"Abdul Rehman",lname:"JAmi",Age:21};
let text="";
for(let x in person)
{
text +=x+" : "+person[x]+" . ";
}
console.log(text);
const s=[21,23,22,77,21];
let text1="";
for(let x in s)
{
text1 +=s[x]+" _ ";
}
console.log(text1);
const y=[54,23,64,24];
let text2 ="";
y.forEach(disply);
function disply(value)
{
text2 +=value+"_";
}
console.log(text2);
>>>>>>> 38e2d0f77d87eb3e70f04330fc7e52cf9741a83c