#Need help on the last exercice of Mixed Juices (Javascript)
4 messages · Page 1 of 1 (latest)
- Expected - 1
+ Received + 0
Array [
- "All or Nothing",
"Pure Strawberry Joy",
]
72 | const expected = ['All or Nothing', 'Pure Strawberry Joy'];
73 |
> 74 | expect(remainingOrders(7, orders)).toEqual(expected);
| ^
75 | });
76 |
77 | test('correctly handles orders that were started because there was time left', () => {
at Object.toEqual (mixed-juices.spec.js:74:40)```
Hi
I'm stuck with mix juices test 3. I cannot get my head around with.
After some time, I tried with help from ChatGpt:
Here is my code:
I'm failing at test 9 and 11 - but test 8 and 10 are correct.
I don't have the if statement in my loop: my loop uses the same condition and and updates i. After the loop, I return orders.slice(i)