Implement a memory game in any JS framework or vanilla JS.
You need to implement this game based on some demo app that you can play around with beforehand.
You need to implement the HTML, CSS, and JS all from scratch.
The game has the following behavior:
- You need to display N x N cards in a grid layout.
- The number of N should be configurable by the user through a slider.
- When the user clicks a "start" button, N cards are highlighted for 2-3 seconds.
- Then the user needs to click on the cards that were highlighted.
- If the user clicks on the correct card, it changes the color to green; otherwise, it changes to red.
- If all the initially highlighted cards are clicked, the game is over.
What to watch out for:
- You need to track the cards that were clicked in the grid.
- You need to pick N random cards to be highlighted for each round of the game.
- You need to make sure the grid of N cards can be increased and reduced.
It's not enough that the app works; you also need to write clean, readable code.
You have about 40 minutes to implement this, and you need to talk through your work.