菲波那切数列
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>菜鸟教程(runoob.com)</title>
</head>
<body>
<script type="text/javascript">
var n = parseInt(window.prompt('input'));
var f = 1,
s = 1,
t;
if(n > 2){
for(var i = 0; i < n - 2 ; i++ ){
t = f + s;
f = s;
s = t;
}
document.write(t);
}else{
document.write(1);
}
</script>
</body>
</html>