Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
I have a similar problem but in this case both numbers ARE prime. I double checked.
(6, 100, 110)
101 is a prime number.
101 + 6 = 107
107 is also a prime number
My function is returning [ 101, 107 ] (both prime numbers between 100 and 110 with an interval of 6).
Still, the kata points an error "expected [ 101, 107 ] to deeply equal null".
I dont understand :(
Just figured it out. There can be no primes in between.
Sorry
361 isn't prime, it is evenly divisible by 19.
I'm having the same issue, for some reason the console.log shows that [1, 2, 5] is being passed as the coinDenominations. Only when I console.log it with nothing else on the function does it show as [1,2,5,10,20,50]
Not an issue, it's only available in Node 14. or above
the problem in your code is that
Array.splice()
is inefficient for very large arrays, because it has to shift all of the indexes to the right of the deleted element. so, calling it in a loop is slow.Probably, yes.
Check that too ^
Because
replaceAll
doesn't work in all Node's versions.