Zach Braff as J.D. and Sarah Chalke as Elliot

Sergei Bachlakov/Disney

J.D. and Elliot may be divorced, but their love lives are still very much intertwined. And following the latest episode of "Scrubs," they're both suddenly single again.

The trouble begins when J.D. (Zach Braff) and Elliot (Sarah Chalke) struggle to make time for their respective significant others, Charlie (Rachel Bilson) and Sean (TV's Scott Foley). J.D.'s first day off in months is cut short when he's called back to Sacred Heart, putting the kibosh on a planned beach day with Charlie. Meanwhile, Sean is left waiting around while Elliot tends to a young patient who has somehow managed to swallow his entire state quarters collection.

Hoping to make it up to their partners, J.D. and Elliot invite Charlie and Sean to join them for Turk's birthday dinner. Carla has taken the kids out of town so her husband can celebrate however he pleases, and he's opted for a fancy steak dinner with his two best friends. (Honestly, I'm a little disappointed that we didn't get a "Steak Night" redux. And while Carla's absence is a convenient way to account for Judy Reyes' recurring status — "High Potential" remains in first priority — it's hard to believe Turk wouldn't want to spend his birthday with his wife.)

Of course, even a birthday dinner can't keep these doctors away from Sacred Heart. When the newbies page Turk about a patient who's coding, he has no choice but to leave. And J.D. and Elliot soon follow suit after noticing that their waiter's eye looks like it's practically popping out of his head.

That leaves Charlie and Sean with little choice but to tag along to the hospital, where they split an expensive bottle of wine while watching "Frozen" in the pediatric unit. (Apparently, it's the only movie that ever plays in pediatric units.)

Charlie and Sean's Shocking Hookup

While Charlie and Sean are left to entertain themselves, J.D. and Elliot are reminded of just how well they still work together. It's also the first real indication that the former spouses may be headed for (an inevitable) reconciliation. They reflect on how difficult life was in the immediate aftermath of their divorce. Elliot recalls bingeing Pringles straight from a can wedged between "the girls," while J.D. admits that he spent a period sleeping at the foot of Turk and Carla's bed like a dog. But they've both come a long way since then, and they're genuinely happy to see each other moving on.

"It's clear how much Charlie likes you," Elliot tells J.D.

"Thank you. And I know I haven't always been a huge fan of Sean, but he is a handsome SOB, and I can tell that he really loves you," J.D. replies. Famous last words!

Just as J.D. and Elliot finish congratulating each other on their respective relationships, they catch Charlie and Sean making out, with Charlie straddling Sean. Turk arrives just in time to join his two stunned best friends, delivering the only appropriate response: "Damn!"

Later, J.D. and Elliot meet their now-exes at Lloyd's Tavern, where Charlie and Sean apologize for how things went down. And in a fitting conclusion to Foley's return, Sean gets the last laugh when J.D. insists that he's technically Elliot's ex-ex-ex-boyfriend now.

"Nobody cares, J.D.!" Sean fires back.

And just like that, J.D. and Elliot are both back on the market. But for Sean, there's a certain poetic justice to how it all played out. After years of J.D. coming between him and Elliot, Sean finally got to turn the tables on his longtime romantic rival — and he barely even had to try.

Of course, there's one rather significant piece of history that goes unmentioned: This isn't the first time Sean has gotten together with someone J.D. was romantically involved with — you know, other than Elliot. Back in Season 8, Sean began dating Kim, the mother of J.D.'s son Sam, though J.D. and Kim had long since broken up and were merely co-parenting by that point. But as I confirmed with showrunner Aseem Batra, the powers that be have decided to sweep that particular development under the rug and pretend it never happened. And given how brief Foley's return turned out to be, that was probably for the best.