-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
52 lines (43 loc) · 904 Bytes
/
main.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
let data = [
{
name: ' Nicholas',
age: 33,
weight: '73Kgs',
Height: '6ft 2ins'
},
{
name: 'Bravin',
age: 23,
weight: '63Kgs',
Height: '6ft '
},
{
name: 'Amanda',
age: 35,
weight: '71Kgs',
Height: '5ft 11ins'
},
{
name: 'Boyce',
age: 31,
weight: '68Kgs',
Height: '6ft 1ins'
},
{
name: 'Hanna',
age: 27,
weight: '71Kgs',
Height: '5ft 7ins'
},
{
name: 'Mikey',
age: 25,
weight: '65Kgs',
Height: '6ft 4ins'
},
];
const info = document.querySelector('#info')
let details = data.map(function (item) {
return '<div>' + `${item.name} is ${item.age} years old, weighs ${item.weight} and is ${item.Height}` + '</div>'
});
info.innerHTML = details.join('\n')