We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3b1ff4 commit 333a3a1Copy full SHA for 333a3a1
script.js
@@ -0,0 +1,12 @@
1
+fetch('data.json')
2
+ .then(response => response.json())
3
+ .then(data => {
4
+ const gamesContainer = document.querySelector('.games');
5
+
6
+ data.forEach(item => {
7
+ const game = document.createElement('div');
8
+ game.classList.add('game');
9
+ game.innerHTML = `<img src="${item.image}" alt="${item.title}"><h2>${item.title}</h2>`;
10
+ gamesContainer.appendChild(game);
11
+ });
12
0 commit comments