Tests are fine, your code is returning wrong results, try with this test:
assert.strictEqual(formatDuration(132030240), "4 years, 68 days, 3 hours and 4 minutes");
Not a kata issue. The error message is:
expected'4 years, 1528 days, 3 hours and 4 minutes'// this is your wrong answertoequal'4 years, 68 days, 3 hours and 4 minutes'// this is the right answer
🤣 You spoilt it with the return {...acc}. acc is already an object so there is no reason to spread it into another object. A simple return acc would do.
Brain power overload ❗❗❗ Cannot compute
This solution doesn't completely work. It returns new ZeroOrMore(null) when given '*' rather than just null. It also doesn't work for a**
This is so complex yet so clever. So much math involved that i don't understand 🤯
This is actually clever. I didn't even think to use recursion.
You can't once it's been resolved or it has some answers. Don't worry about it.
How to take down the comment ??
If anyone knows please say
Sorry my bad. Had an extra space in the and thus kept failing with
"5 minutes and 2 seconds" expected "5 minutes and 2 seconds"
Taking down the comment in 1 minute
Tests are fine, your code is returning wrong results, try with this test:
Not a kata issue. The error message is:
What tests and what values?
Javascript
This kata has faulty test
The tests are expecting wrong values
🤣 You spoilt it with the return {...acc}. acc is already an object so there is no reason to spread it into another object. A simple return acc would do.
Test.assertEquals(elderAge(28827050410, 35165045587, 7109602, 13719506), 5456283)
getting a range error for the above test case, invalid array length
😂😂😂 Almost all comments flagged for having spoilers. Trying to figure a way to reduce the time.
༼ つ ◕_◕ ༽つ. I'm so glad i understand regex
Clever how you used the uppercase and lowercase to test if its a letter 👍
Loading more items...