mirror of
https://github.com/MrEidam/PetPet.git
synced 2026-04-17 15:43:31 +00:00
24 lines
533 B
JavaScript
24 lines
533 B
JavaScript
const games = [
|
|
{
|
|
name: '2048',
|
|
link: '2048',
|
|
},{
|
|
name: 'Dice War',
|
|
link: 'DiceWar',
|
|
},{
|
|
name: 'Number Quess 6',
|
|
link: 'NumberQuess6',
|
|
},{
|
|
name: 'Rock Paper Scissors',
|
|
link: 'RockPaperScissors',
|
|
},
|
|
];
|
|
|
|
window.onload = () => {
|
|
for(let i=0; i<games.length; i++){
|
|
document.body.innerHTML += `
|
|
<a href="./${games[i].link}" class="game">
|
|
<img src="./${games[i].link}/icon.png" alt="${games[i].name}">
|
|
</a>`
|
|
}
|
|
} |