Created
June 18, 2015 17:38
-
-
Save anonymous/1bf90ce5a2ab08ad465b to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/jofaru
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>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
//Fibonacci get nth | |
function fibonacci(n){ | |
if(n<=1) | |
return n; | |
else | |
return fibonacci(n-1) + fibonacci (n-2); | |
} | |
fibonacci(12); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">//Fibonacci get nth | |
function fibonacci(n){ | |
if(n<=1) | |
return n; | |
else | |
return fibonacci(n-1) + fibonacci (n-2); | |
} | |
fibonacci(12);</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
//Fibonacci get nth | |
function fibonacci(n){ | |
if(n<=1) | |
return n; | |
else | |
return fibonacci(n-1) + fibonacci (n-2); | |
} | |
fibonacci(12); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment