Display Questions to Players
Learn how to display a trivia question to all players.
Task 11: Display a trivia question for all players
Next, when any of the players click on the “Get Question” button, the game should begin for all players in the room. The same trivia question should display in the “Trivia” section for all players. In the client, public/js/trivia.js, send an event called getQuestion to the server when any player clicks the “Get Question” button:
- In the client (i.e.,
public/js/trivia.js
), send an event calledgetQuestion
to the server when any player clicks on the “Get Question” button:
Get hands-on with 1400+ tech skills courses.