-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
54 lines (49 loc) · 965 Bytes
/
index.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
(()=>{
const movieLibrary= [
{
name: "The Owl House",
source: "./assets/owl-house.jpeg"
},
{
name: "Arcane",
source: "./assets/arcane.jpeg"
},
{
name: "Cuphead",
source: "./assets/cuphead.jpeg"
},
{
name: "Amphibia",
source: "./assets/anfibia.jpeg"
},
{
name: "Fiona and Cake",
source: "./assets/fiona-and-cake.jpeg"
},
{
name: "The amazing world of Gumball",
source: "./assets/gumball.jpeg"
},
{
name: "Tangled",
source: "./assets/tangled.jpeg"
},
{
name: "Wander over Yonder",
source: "./assets/wander.jpeg"
},
];
const movieContainer= document.querySelector(".movie-container")
let movieCard=``
movieLibrary.map((movie,index) =>{
movieCard= movieCard+`
<div class="movie-card">
<img src=${movie.source} alt=${movie.name} key= ${index} class="poster-img">
<h2 class="movie-title">${movie.name}</h2>
</div>
`
return movieCard
})
movieContainer.innerHTML= movieCard
})
()