Your friend: “Oh no, I just realized I got you the wrong coffee! Ah! I’m so sorry. ” You: “No harm, no foul! I’m just happy to have a coffee to wake me up!”
Your friend: “Your hair kind of makes you look like Dora the Explorer today. ” You: “Really? I thought it looked kind of nice. ” Your friend: “Oh! I didn’t mean to hurt your feelings. It really does look nice. Are you upset?” You: “No, no. No harm, no foul. It was just a silly joke. ”
If someone backed their car into yours and drove away, but you and your car are uninjured, this would be a case of “no harm, no foul”. Although they committed a hit and run, which is illegal, because there was no damage, it doesn’t matter because you wouldn’t have been able to take legal action anyways.