Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <title>setInterval  example</title>
</head>
<body>
</body>
</html>
 
var addStarToTheBody = function(){
    document.body.innerHTML += "*";  
};
 
//this will add one star to the document each 200ms (1/5s)
setInterval(addStarToTheBody, 200);
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
MichelBuffapro
0viewers