20248
2048 Game 2048 Game document.addEventListener(‘DOMContentLoaded’, () => { const grid = document.getElementById(‘grid’); const gridSize = 4; let cells = []; function createGrid() { for (let i = 0; i < gridSize * gridSize; i++) { const cell = document.createElement('div'); cell.classList.add('cell'); grid.appendChild(cell); cells.push(cell); } generateNumber(); generateNumber(); } function generateNumber() { let emptyCe