Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

set timer

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);
Comment

PREVIOUS NEXT
Code Example
Javascript :: asyncio.sleep in javascript 
Javascript :: express basic routing syntax 
Javascript :: round off value in javascript 
Javascript :: JavaScript finally() method 
Javascript :: destructuring javascript 
Javascript :: vector icons react native 
Javascript :: date formatting javascript 
Javascript :: fetch api example 
Javascript :: convert json to dart 
Javascript :: angular mat side nav 
Javascript :: use of slot in vue 
Javascript :: new keyword in js 
Javascript :: express middleware status code always 200 
Javascript :: Activez la compression de texte react js 
Javascript :: ubicar escrol en el final 
Javascript :: javascript last elements same class 
Javascript :: frame-grab js 
Javascript :: moment_timezone_1.default(...).tz(...).format is not a function 
Javascript :: flask server js return from folder 
Javascript :: onpress react native datepicker stackver flow 
Javascript :: nestjs test db 
Javascript :: how to update react state array 
Javascript :: onclick how to post card data to api 
Javascript :: como saber cuando un link cambia angular 
Javascript :: how er create json data file to train our rasa model 
Javascript :: att asm jmp 
Javascript :: connect react native app to local api macos 
Javascript :: gatsbyjs shop flotiq 
Javascript :: firebase remove not valid token 
Javascript :: javascript loop payment 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =