set timer
You are on google timer, press start to start the timer, and press reset to reset it.const prompt = require('prompt-sync')();
//You gotta download prompt-sync by doing npm i prompt-sync
var time = prompt("Give time in seconds: ")
time = parseInt(time)
setInterval(function(){
console.log(time)
if(time = 0){
console.log("Time over")
}
else{
time = time - 1}
}, 1000);
Also in JavaScript:
- http request without a library in javascript
- javascript Prevent Object MutationPassed
- toggle class javascript stack overflow
- how to get the number of days in a month in javascript
- javascript setattribute onclick function with parameters
- how to make a inventory in js
- isDate javascript
- react 3d icon library
- loop javascript
- jwt strategy
- immediately invoked function expression
- d3 v6
- js reverse number
- how to compare two strings in javascript if condition
- ejs-multiselect
- how to make modules structure like lodash
- how to calculate balance automatically using javascript and php using cash paid
- download .json file
- js convert obj to array
- Javascript merge two objects
- docker node label add
- node js check type of variable
- nodejs copy and rename file
- Uncaught (in promise) SyntaxError: Unexpected token O in JSON at position 0