Skip to content

Instantly share code, notes, and snippets.

/* Task description */
/*
Write a function that finds all the prime numbers in a range
1) it should return the prime numbers in an array
2) it must throw an Error if any on the range params is not convertible to `Number`
3) it must throw an Error if any of the range params is missing
*/
function findPrimes(from, to) {
if (isNaN(Number(from)) || isNaN(Number(to))) {