#Need help on the last exercice of Mixed Juices (Javascript)

4 messages · Page 1 of 1 (latest)

kind crag
#

I'm getting this on the test

#

    - 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)```
ionic glade
#

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.

wanton prairie
#

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)