Java Reference
In-Depth Information
// stop the countdown interval
Finally, we need to change the event listener for the start button to create a new instance of
the Game constructor function—instead of calling the play() function—as follows:
// Event listeners
$start.addEventListener('click', function() { new
Game(test) } ,
If you have a go at playing the quiz by opening index.htm in your browser, you'll notice
that nothing has changed in the way the game plays. We've made some very big changes
to the code, though, as we have made the design much more object-oriented.
Search WWH ::

Custom Search