This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let curr = 0; | |
const circle (arr, dir) => { | |
curr = (curr + arr.length + (dir ? -1 : 1)) % arr.length; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Easy Recursive Functions | |
## Factorial | |
``` | |
const factorial = n => n > 1 ? n * factorial(n-1) : 1; | |
``` | |
## Fibonacci | |
``` |