Skip to content

Instantly share code, notes, and snippets.

@AndSheCodes2
Forked from anonymous/index.html
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndSheCodes2/a89d0a7b340e3de5d3f0 to your computer and use it in GitHub Desktop.
Save AndSheCodes2/a89d0a7b340e3de5d3f0 to your computer and use it in GitHub Desktop.
<!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>
//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