🐍Creating a variable for directions and using an object containing direction names and corresponding arrays for coordinates.
🍎Setting up variables for snake and apple coordinates, as well as the current direction.
⬆️⬇️⬅️➡️Updating the direction based on user key presses and starting the game interval.
➕Adding a new snake section and direction using bitwise calculations for wrapping around the canvas.
🍏Choosing a new Apple location until it is not on the snake's body.