Repository navigation
Expand file tree
/
Copy pathtrial.js
More file actions
110 lines (92 loc) · 1.89 KB
/
Copy pathtrial.js
File metadata and controls
110 lines (92 loc) · 1.89 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
console.log("Hi Monika!")
const json = {
"count": 20,
"next": null,
"previous": null,
"results": [
{
"name": "normal",
"url": "https://pokeapi.co/api/v2/type/1/"
},
{
"name": "fighting",
"url": "https://pokeapi.co/api/v2/type/2/"
},
{
"name": "flying",
"url": "https://pokeapi.co/api/v2/type/3/"
},
{
"name": "poison",
"url": "https://pokeapi.co/api/v2/type/4/"
},
{
"name": "ground",
"url": "https://pokeapi.co/api/v2/type/5/"
},
{
"name": "rock",
"url": "https://pokeapi.co/api/v2/type/6/"
},
{
"name": "bug",
"url": "https://pokeapi.co/api/v2/type/7/"
},
{
"name": "ghost",
"url": "https://pokeapi.co/api/v2/type/8/"
},
{
"name": "steel",
"url": "https://pokeapi.co/api/v2/type/9/"
},
{
"name": "fire",
"url": "https://pokeapi.co/api/v2/type/10/"
},
{
"name": "water",
"url": "https://pokeapi.co/api/v2/type/11/"
},
{
"name": "grass",
"url": "https://pokeapi.co/api/v2/type/12/"
},
{
"name": "electric",
"url": "https://pokeapi.co/api/v2/type/13/"
},
{
"name": "psychic",
"url": "https://pokeapi.co/api/v2/type/14/"
},
{
"name": "ice",
"url": "https://pokeapi.co/api/v2/type/15/"
},
{
"name": "dragon",
"url": "https://pokeapi.co/api/v2/type/16/"
},
{
"name": "dark",
"url": "https://pokeapi.co/api/v2/type/17/"
},
{
"name": "fairy",
"url": "https://pokeapi.co/api/v2/type/18/"
},
{
"name": "unknown",
"url": "https://pokeapi.co/api/v2/type/10001/"
},
{
"name": "shadow",
"url": "https://pokeapi.co/api/v2/type/10002/"
}
]
}
myOut = json.results.map(leTypes => {
return leTypes.name
})
console.log(myOut)