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.
That means rounded down.
I agree. there was one for 38.53 hours...my solution rounded up to 39 hours, 39 times 0.5 is 19.5, but it 'expected' 19. Doesn't make sense since it tells you to round, and that he drinks 0.5 an hour. I don't think it counts as a coding challenge when the instructions are deliberately not true.
I spent 10 minutes (cuz long query times) trying to figure out how to join tables to get results for only Jon and Mike, just to find out there is noone else... -___-
Personally I find this description kinda confusing.
'Nathan drinks 0.5 liter every 1 hour.'
This way it makes no sense that for 11h he drank 5l instead of 5.5l.
It's more like he drinks 1l every 2h.
I know it's about semantics, but in my case it made this simple kata hard, cuz I rounded wrong thing to smalles number as it matched the description better in my eyes.
Thank you very much for your help <3
It indeed works if I put first condition in the same line as return.
return
and the next line of your code must be in the same line for it to work. Your function is returningundefined
and that's a falsy value, the tests withtest.expect
don't check if your function returned a boolean, that's why it seems it works for the ones that expectfalse
.This comment is hidden because it contains spoiler information about the solution