function sumFibs(num) {
	let acc = [];
	const originalNum = num;
	let a = 1;
	let b = 0;
	let temp, total;

	if (num === 0 || num === 1) {
		return 1;
	}

	while (num > 0) {
		temp = a;
		a += b;
		b = temp;
		acc.push(a);
		num--;
	}
	
	// total is always off by 1, adding it at the end
	total = iterateSum(acc, originalNum) + 1;
	return total;
}
// For example, sumFibs(10) should return 10 because all odd Fibonacci numbers less than or equal to 10 are 1, 1, 3, and 5.
For example, sumFibs(10) should return 10 because all odd Fibonacci numbers less than or equal to 10 are 1, 1, 3, and 5.
For example sumFibs ( 10 ) should return 10 because all odd Fibonacci numbers less than or equal to 10 are 1 1 3 and 5 .
function sumFibs(num) {
	let acc = [];
	const originalNum = num;
	let a = 1;
	let b = 0;
	let temp, total;
	if (num === 0 || num === 1) {
		return 1;
	}
	while (num > 0) {
		temp = a;
		a += b;
		b = temp;
		acc.push(a);
		num--;
	}
	total = iterateSum(acc, originalNum) + 1;
	return total;
}
function sumFibs ( num ) { let acc = [ ] ; const originalNum = num ; let a = 1 ; let b = 0 ; let temp , total ; if ( num === 0 || num === 1 ) { return 1 ; } while ( num > 0 ) { temp = a ; a += b ; b = temp ; acc . push ( a ) ; num -- ; } total = iterateSum ( acc , originalNum ) + 1 ; return total ; }
For example, sumFibs(10) should return 10 because all odd Fibonacci numbers less than or equal to 10 are 1, 1, 3, and 5.
For example sumFibs ( 10 ) should return 10 because all odd Fibonacci numbers less than or equal to 10 are 1 1 3 and 5 .
// total is always off by 1, adding it at the end