Ad
  • Custom User Avatar

    m (integer > 2) which gives the start of the search (m inclusive)

    n (integer >= m) which gives the end of the search (n inclusive)

    That's in the kata's description, so (1, 1, 10) is not a valid input

  • 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