-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathchange.js
More file actions
77 lines (65 loc) · 1.4 KB
/
Copy pathchange.js
File metadata and controls
77 lines (65 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
const seconds = document.getElementById("seconds");
const tens = document.getElementById("tens");
let i;
let num;
console.log(seconds);
console.log(tens);
/*
? What I have to do ?
TODO : onclick of start button, it should start from 60 to 0, means it will decrease every one second,
* Need three buttons start, stop & reset
* first make simple for 10s to decrease to 0
! Time should decrease every second,
*/
function start() {
// let i
// time_in = 10
// for (i=time_in; i<10; i--){
// console.log(i)
// // tens.textContent = i
// }
// console.log("Start")
i = 5;
num = 100;
while (i<num) {
tens.textContent = decrease()
setInterval(decrease,1000)
i += 5;
}
// console.log("Done!!")
// let i
// for (i=0; i<4; i++){
// tens.textContent = i
// }
// console.log(tens)
}
/*
! function reduce() {
// // alert("Shown!!")
} */
function decrease() {
let i = 10;
// for (i; i==0; i--) {
// console.log("Done!!")
// }
for (num=0; num>0; num--) {
i -= 1;
}
console.log("return i")
// alert("done!!")
// let i;
// let num = 0;
// for (i=10; i>num; i--) {
// tens.textContent = i
// // console.log("Done!!")
// }
// console.log(tens)
}
function decrease_10() {
i = 10;
for (i; i<50; i++) {
tens.textContent = i
console.log(tens)
// console.log("Done!!")
}
}