I would like to know how you can create a stopwatch on javascript to start when the button is clicked and then to stop when it reaches 25 clicks and then show the time. Here is my current code:
<script>
var test= 1;
function myFunction(){
if(test < 26){
document.getElementById("hello").innerHTML= test;
test++;
}
}
</script>
This code counts up to 25 but I want it to count up to 25 with the stopwatch on starting at the first click and finishing on 25 and then showing the time. Thanks