//Returns a Fibonnaci number

//@param n is an integer

function fibonacci(n)

{

if(n < 0)

{

return 0;

}

else if(n <= 2)

{

return 1;

}

else

{

return fibonacci(n - 1) + fibonacci(n - 2)

}

}

# Get fibonacci numbers using JavaScript function

This entry was posted in Uncategorized. Bookmark the permalink.