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
I think because in the sum prototype he gives an initial value of 0 in the reduce function. So if an empty array is passed that will be the default value
361 isn't prime, it is evenly divisible by 19.
I think there is an issue in a test of JavaScript, correct me if im wrong.
From this input(8, 300, 400)
expected null to deeply equal [ 359, 367]
/nBut between 359 and 367 there is 361 that is prime. so... what i am missing? Is the only test of 100 that goes bad
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]
"a" is the array, to know the length of the array to add the correct amounts of "0" - "y" wich is the index
This comment is hidden because it contains spoiler information about the solution
I don't get it, maybe is 'cause my inglish is not to good but i will share my doubts:
In the array of example of the instructions
it says that # patients at index 0, 2, and 3 are hypertensive;
why at index 3 and not also at index 4? it s because have to be the the last two elements of the array consecutive? I mean the 4th array have 140/94 and 140/90 but the last two tests of hypertension give 120/80 and 130/84 so in conclusion doesn't have hypertension? And if its like i interpret it i have to check only the last two test of the patient and all the other test are noise? I will gladly apreciate an answer. Have a good day/night
how this can be Best Practices?... i mean is clever for sure, but it is really dificult to read
Not an issue, it's only available in Node 14. or above
I flatten the array "by hand" and it works so the only problem was that. Maybe because and old version of node or what can may be?
Im in JS, when i run the tests it gives me a message saying: "arr.flat is not a function"... anyone knows why? because i run the same code in other plataform and it work just fine
Its in JavaScript
I have an issue... i run my code on RunJS and there all the test cases pass fine but when i copy the same code and run the test here not passes all of them and with a console.log i see that here it works really weird. How can i do to solve this?
Here in this test case: coinsNeeded(123,[1,2,5,10,20,50]) the console.log shows me that only uses to reduce the amount by 5...
but in my RunJS its reduced properly as shown in the sample test (50+50+20+2+1). I will copy my code here for you to test it in diferrent places but idk if its correct doing that here. So i wait for a response to try to solve my problem. Thank you and have a good day
Loading more items...