<aside> 💡 The button that actually starts the countdown to take a pic
</aside>
<button class='btn btn-md btn-block' id='snap'>Start</button>
snap.addEventListener("click", function() {
countdown1();
});
Notes
addEventListener()
will attach an event handler to an HTML elementsnap
addEventListener()
method which takes a click event and callback function as argumentscountdown1()
. This corresponds to the first countdown from 10 to 0 which will take the 1st pic