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

Build a Prime Number Sum Calculator

In this lab, you will build a calculator that takes a number and returns the sum of all prime numbers that are less than or equal to that number. **Objective**: Fulfill the user stories below and get all the tests to pass to complete the lab. **User Stories:** 1. You should have a `sumPrimes` function that accepts a number as an argument. 1. The `sumPrimes` function should return the sum of all prime numbers less than or equal to the provided number. 1. If the input number is less than `2`, the function should return `0`.
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.