Your partyBill() function passed its tests, so it works out the right total and share and hands back the exact two-line message from the brief. Nice work! The tests can’t check one thing, though: whether you can explain why your code gives those numbers and what would happen if the party changed.
That’s what this review is for. You’ll explain your bill line by line, predict what changes with the party size, and say why each name uses const or let. Being able to do that is what lets you change a program with confidence, rather than editing it and hoping the tests stay green.
Talk Your Bill Through With the Mentor
The button below opens a new conversation with the mentor and sends a short opening message for you. The mentor then asks one question at a time and waits for your answer. When you get stuck, it gives you a hint or a smaller example rather than the answer.
The mentor can’t see your exercise code or run it, so its first question asks you to paste in your partyBill() function. Copy it from the exercise before you start. If you don’t have it at hand, say so, and the mentor will show you a short version to work with. The whole conversation takes about ten minutes.