Created
June 1, 2017 08:47
-
-
Save musale/b98c9516c4e93797c0769d0267b20f54 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/zenopub
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"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
var fibonacci = []; //{1} | |
fibonacci[0] = 0; | |
fibonacci[1] = 1; //{2} | |
fibonacci[2] = 1; //{3} | |
for (var i = 3; i < 20; i++) { | |
fibonacci[i] = fibonacci[i - 1] + fibonacci[i - 2]; ////{4} | |
} | |
console.log(fibonacci); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var fibonacci = []; //{1} | |
fibonacci[0] = 0; | |
fibonacci[1] = 1; //{2} | |
fibonacci[2] = 1; //{3} | |
for (var i = 3; i < 20; i++) { | |
fibonacci[i] = fibonacci[i - 1] + fibonacci[i - 2]; ////{4} | |
} | |
console.log(fibonacci);</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 fibonacci = []; //{1} | |
fibonacci[0] = 0; | |
fibonacci[1] = 1; //{2} | |
fibonacci[2] = 1; //{3} | |
for (var i = 3; i < 20; i++) { | |
fibonacci[i] = fibonacci[i - 1] + fibonacci[i - 2]; ////{4} | |
} | |
console.log(fibonacci); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment