Ad
  • Default User Avatar

    if you want to get prime numbers with 1 gap between 1 and 10 ( "gap(1, 1, 10)" ) it should return [2,3] but it will return [1,2] and 1 is not a prime number. So you should add another verification in the isPrime function whereas if i == 1 return false