Skip to content

Commit

Permalink
added type n as number
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiba Hamad authored and Hiba Hamad committed Aug 30, 2024
1 parent e94c33c commit 079991b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fib.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// util function that computes the fibonacci numbers
module.exports = function fibonacci(n) {
module.exports = function fibonacci(n: number): number {
if (n < 0) {
return -1;
} else if (n == 0) {
Expand Down

0 comments on commit 079991b

Please sign in to comment.