New course! Every coder should learn Generative AI!
Try a free lesson- 5
A timer program that count click from user in 1 min can you guys code ??
7 Answers
+ 9
Cannot
+ 8
Jamie๐ fascinating argument... i believe my egg timer is sit for 1 minute. Oh! but, it isn't JavaScript... And I am not concerned about counting clicks by a single user in one minute...
Insanity - someone doing the same thing over and over expecting different results on a click counter...
Satya show us your attempt
+ 3
Jamie๐ signing your paycheck ?
๐๐๐, you know no one would pay for that don't you?
+ 2
So how much are we talking about here ? (let me see if I can afford you ๐)
+ 2
BroFarOpsยฉยฎ๏ธโข๏ธ ๐ฑ I got a laugh out of that one ๐
+ 2
but i need more functionality. that is user click counter in 1 min
+ 1
Jamie๐ ,Emma ,BroFarOpsยฉยฎ๏ธโข๏ธ ๐ฑ
var timer = 60;
var min = 0;
var sec = 0;
function countDown() {
min = parseInt(timer/60);
sec = parseInt(timer%60);
if (timer > 1) {
document.getElementById('tm').innerHTML = 'TimeOUt';
}
document.getElementById('tm').innerHTML = "<b>Time Left: </b>" +min.toString()+':'+sec.toString();
timer--;
setTimeout (function() {
countDown();
}, 1000);
}