+ 1
Write a program-timer, that will take the count of seconds as input and output to the console all the seconds until timer stops?
How can do it? My code- function main() { var seconds = parseInt(readLine(), 10) // Your code here while (seconds >= 0){ document.write(seconds+ "<br>"); seconds--; } }
2 odpowiedzi
+ 1
Could you add some details ?
I suggest to replace document.write line with (console.log(seconds + " ")).
Maybe the output is governed by time, which means every one second an output should appear.
+ 1
Working!