All Tracks/lab odd fibonacci sum calculator/
Đang tải...
Hướng dẫn thử thách
1 / 1

Build an Odd Fibonacci Sum Calculator

In this lab you will build an odd Fibonacci sum calculator that computes the sum of all odd Fibonacci numbers that are less than or equal to a given positive integer. **Objective**: Fulfill the user stories below and get all the tests to pass to complete the lab. **User Stories:** 1. You should have a `sumFibs` function that accepts a number as an argument. 1. The `sumFibs` function should return the sum of all odd Fibonacci numbers that are less than or equal to the given number. 1. The Fibonacci sequence starts with `0` and `1`, and each subsequent number is the sum of the two previous ones. 1. Only the odd Fibonacci numbers should be added to the sum.
Vượt qua bài kiểm tra hiện tại để mở khóa bài tiếp theo.
main.js
UTF-8 • Tab Size: 2Kiểm tra bài:⌘↵
Test Output
Thử thách này không có bài test tự động. Hãy quan sát kết quả trực tiếp ở khung Preview.