Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript Display Time Every 3 Second

// program to display time every 3 seconds
function showTime() {

    // return new date and time
    let dateTime= new Date();

    // returns the current local time
    let time = dateTime.toLocaleTimeString();

    console.log(time)

    // display the time after 3 seconds
     setTimeout(showTime, 3000);
}

// calling the function
showTime();
Comment

PREVIOUS NEXT
Code Example
Javascript :: {"statusCode":400,"error":"Bad Request","message":"Unexpected token o in JSON at position 1"} 
Javascript :: create index mongodb 
Javascript :: javascript declare empty array 
Javascript :: vuejs enter phone with country flag 
Javascript :: compare two dates in javascript 
Javascript :: mathjax arrow 
Javascript :: proxmox local storage path 
Javascript :: change bg-color all class 
Javascript :: krakend config example 
Javascript :: axios post query params 
Javascript :: JSX element event listeners 
Javascript :: react-with-firebase-auth 
Javascript :: array of objects in javascript short 
Javascript :: writeFile using stream nodejs from string 
Javascript :: arrow functions javascript 
Javascript :: install react hotjar 
Javascript :: opposite of includes javascript 
Javascript :: javascript recursive on object of arrays 
Javascript :: how to host a react website 
Javascript :: console 
Javascript :: listen for double click before click 
Javascript :: toast notification angular bootstrap 8 
Javascript :: jquery get data element 
Javascript :: Create buffers from strings using the Buffer.from() function. Like toString(), you can pass an encoding argument to Buffer.from(). 
Javascript :: javascript timeline 
Javascript :: javascript events 
Javascript :: angularjs form validation on submit 
Javascript :: how to replace array element in javascript without mutation 
Javascript :: javascript add maxlength attribute 
Javascript :: regex exact match 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =