html
html
1
2
3
4
5
6
7
8
9
10
11
<!-- Created by SaravanaSRK-->
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body bgcolor="#00ff00">
</body>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
/* Created by SaravanaSRK */
body {
}
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var x, hello; // global var
var count = 0; // print counts
function startandstop(){
x = +prompt("How many time you want to say hello");
if(!isNaN(x) && x!==0) hello = setInterval(timer,200); // init timer
}
function timer() { // timer function
document.write("Hello "); // print
count++;
if(count===+x) clearInterval(hello); // stop timer
}
startandstop(); // run the function
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run