Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

the settimeout() method receives the second parameter in

/*
	The setTimeout() function takes two arguments. One for the function to call and one for
	the time delay in milliseconds.
*/
//Example for alerting a user after 1 hour.

function timeUp(){
	alert("You have crossed your screen time limit.");
  	location.reload();
}

setTimeout(timeUp, 3.6 * Math.pow(10, 6)); //1 hour = 3.6 * 10^6 milliseconds.
 
PREVIOUS NEXT
Tagged: #method #receives #parameter
ADD COMMENT
Topic
Name
3+5 =