Question: JavaScript, these parts are all connected. I cant figure out how to do this countdown timer. D . Implement and test startCountDownTimer() method per comments.
JavaScript, these parts are all connected. I cant figure out how to do this countdown timer.
D. Implement and test startCountDownTimer() method per comments. Note: The method code has already been provided.
E. Implement and test stopCountDownTimer() method per comments.
F. Implement and test displayCountDown() method per comments.
G. Implement and test countDown() method per comments.
countDown: function() { // TODO [G]: Decrement and display count down value, and upon reaching 0 stop timer and display card image // Hint: You will need to call displayCountdown(), stopCountDownTimer() and loadImages() }, displayCountDown: function() { // TODO [F]: Update countdown span element with current countdown value // Hint: Get a reference to count down span and set the span textContent property with the counter }, startCountDownTimer: function(start) { // TODO [D]: Start timer, setting any appropriate object properties, with an interval of one second this._startCount = start; this._counter = this._startCount; this.displayCountDown(); this._intervalID = setInterval(this.countDown.bind(this), 1000); }, stopCountDownTimer: function() { // TODO [E]: Stop timer using object timer property // Hint: Will need to call clearInterval() },
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
