Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 88bd8d7

Browse files
committed
Add JSdocs for fibonacci.
1 parent d267d72 commit 88bd8d7

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

‎src/algorithms/math/fibonacci/fibonacci.js‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
// Return a fibonacci sequence as an array
1+
/**
2+
* Return a fibonacci sequence as an array.
3+
*
4+
* @param n
5+
* @return {number[]}
6+
*/
27
export default function fibonacci(n) {
38
const fibSequence = [1];
49

‎src/algorithms/math/fibonacci/fibonacciNth.js‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
// Calculate fibonacci number at specific position using Dynamic Programming approach.
1+
/**
2+
* Calculate fibonacci number at specific position using Dynamic Programming approach.
3+
*
4+
* @param n
5+
* @return {number}
6+
*/
27
export default function fibonacciNth(n) {
38
let currentValue = 1;
49
let previousValue = 0;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /