Code Room
Vibe codingEasyvc-g412
Subject Ai verificationLevel Entry–Mid~10 minCommon in Algorithms & data structures interviewsIndustries Software development

Question

You asked an AI assistant to add a `discount` parameter to your existing `calculatePrice(items)` function in JavaScript. It returned a new version of the function — but it's 30 lines where yours was 12, and it also reformatted everything and seems to have changed how tax is calculated. How do you verify it did what you asked and nothing you didn't, before accepting the change?

What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it — tests, edge cases, reading critically — and how you’d re-prompt or decompose to get it right.

Describe your solution

Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.

Run or narrate your approach, then ask the coach.