Skip to content
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
tasks
tests
README.md
package.json

README.md

Functions and Function Expressions

Task 1.

  • Write a function that sums an array of numbers:
    • Numbers must be always of type Number
    • Returns null if the array is empty
    • Throws Error if the parameter is not passed (undefined)
    • Throws if any of the elements is not convertible to Number

Task 2.

  • Write a function that finds all the prime numbers in a range
    • It should return the prime numbers in an array
    • It must throw an Error if any of the range params is not convertible to Number
    • It must throw an Error if any of the range params is missing
You can’t perform that action at this time.