Created
January 26, 2015 20:57
-
-
Save dirkteucher/6dfd664baf97874ccbee to your computer and use it in GitHub Desktop.
Loop // source http://jsbin.com/kisujo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Loop</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
var i = 0, howManyTimes = 12; | |
function f() { | |
console.log("This is a loop that will run howManytimes"); | |
i++; | |
if( i < howManyTimes ){ | |
setTimeout( f, 300 ); | |
} | |
} | |
f(); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript"> | |
var i = 0, howManyTimes = 12; | |
function f() { | |
console.log("This is a loop that will run howManytimes"); | |
i++; | |
if( i < howManyTimes ){ | |
setTimeout( f, 300 ); | |
} | |
} | |
f();</script></body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var i = 0, howManyTimes = 12; | |
function f() { | |
console.log("This is a loop that will run howManytimes"); | |
i++; | |
if( i < howManyTimes ){ | |
setTimeout( f, 300 ); | |
} | |
} | |
f(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment