Draft

Javascript Codegolf: Fibonacci sequence

Description:

Fibonacci numbers are numbers that follow the pattern F(n) = F(n-1) + F(n-2) with initial conditions F(1) = F(2) = 1.

Your task is to write a function f(n) that returns the nth fibonacci number. This must be done in less than 25 characters.

Examples:

F(10) = 55
F(11) = 89
F(23) = 28657
Restricted

Stats:

CreatedMar 16, 2018
Warriors Trained152
Total Skips11
Total Code Submissions449
Total Times Completed60
JavaScript Completions60
Total Stars1
% of votes with a positive feedback rating70% of 40
Total "Very Satisfied" Votes23
Total "Somewhat Satisfied" Votes10
Total "Not Satisfied" Votes7
Total Rank Assessments37
Average Assessed Rank
6 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • ericwenn Avatar
  • Chrono79 Avatar
Ad