10 pts Create a function where you can check if the number in the given position (num) of the Fibonacci sequence is odd or even. Treat (num) as the position, NOT the index. Consider the Fibonacci sequence to be an array of integers, starting with [0, 1, 1, ....]. Ex. oddEvenFib(5) will return "odd" because the fifth number in fibonacci sequence is 3 [0, 1, 1, 2, 3....].
function oddEvenFib(num){ //Enter your code below }
Test Cases:
  • oddEvenFib(7) to return even
  • oddEvenFib(8) to return odd
  • oddEvenFib(9) to return odd
00:00 / 07:06

Share the mistake you found and we’ll fix as soon as we can.