freeCodeCamp/curriculum/challenges/arabic/02-javascript-algorithms-an.../intermediate-algorithm-scri.../sum-all-odd-fibonacci-numbe...

1.2 KiB

id title isRequired challengeType videoUrl localeTitle
a5229172f011153519423690 Sum All Odd Fibonacci Numbers true 5

Description

undefined

Instructions

undefined

Tests

tests:
  - text: ''
    testString: 'assert(typeof sumFibs(1) === "number", "<code>sumFibs(1)</code> should return a number.");'
  - text: ''
    testString: 'assert(sumFibs(1000) === 1785, "<code>sumFibs(1000)</code> should return 1785.");'
  - text: ''
    testString: 'assert(sumFibs(4000000) === 4613732, "<code>sumFibs(4000000)</code> should return 4613732.");'
  - text: ''
    testString: 'assert(sumFibs(4) === 5, "<code>sumFibs(4)</code> should return 5.");'
  - text: ''
    testString: 'assert(sumFibs(75024) === 60696, "<code>sumFibs(75024)</code> should return 60696.");'
  - text: ''
    testString: 'assert(sumFibs(75025) === 135721, "<code>sumFibs(75025)</code> should return 135721.");'

Challenge Seed

function sumFibs(num) {
  return num;
}

sumFibs(4);

Solution

// solution required