Part of Scrubs' instant appeal as a show when it first aired stemmed from how easy it was to like its main character, John "JD" Dorian, played by Zach Braff. JD's hilarious fantasies fueled the show's comedy, while his learning the intricacies of practicing medicine fueled the show's drama.
He wasn't the only reason why Scrubs was a big hit, but he arguably may have been the most important. Because it was so easy to like JD's goofy nature, seeing an uglier side to him definitely caught everyone's eye.
Enter his brother: Dan Dorian.
How Dan brought out a different side of JD
In the sixth episode of Scrubs' second season, JD's brother Dan, played by Tom Cavanagh, comes into town just in time for Halloween (sidenote: Braff and Cavanagh look so much alike that it's downright scary that they could legitimately pass off as brothers).
As the episode continues, the viewer learns more about Dan, including that he was Mr. Popularity in high school, he's now a part-time bartender, he lives with his mother, and he's getting paid to drive an expensive car across the country.
When he arrives, Dan does typical older brother shenanigans, like teasing JD throughout his visit. The teasing gets to the point where he actually convinces his little brother to let him play doctor so that he won't call him "Bambi" like Carla does.
At first, it seems like JD is excited to see Dan, but it later becomes abundantly clear that he's actually pretty embarrassed by his older brother for not making more of himself.
When JD and Dan finally talk things over, Dan tries to convey that he's happy with how he's turned out, even if he hasn't achieved as much as JD has. At first, JD appears ready to apologize for looking down on his brother, but he coldly tells him off in a "It's well past time for you to grow up!" speech.
"That's a load of crap. Look, I know you, okay? I know the reason you wanted to pretend you were a doctor yesterday is because you hate working at that bar, and you want to feel like somebody for once. And come on, Dan, you're not driving that car across the country for the $300. You're doing it because you like the way you feel when you drive it. And the funny thing is, you can be that guy, but you're afraid that if you actually have to try at something, you might fail, and that's just not a chance you're willing to take."
In summation, JD tells his brother, "Yeah, I'm embarrassed by you, but guess what? YOU'RE EMBARRASSED BY YOU! And you know what's worse? You know darn well it doesn't have to be that way, but you won't do anything about it!"
Until this point, JD had never shown any outright hostility to anyone else in Scrubs. In a Season 1 episode, JD showed he was also ashamed of his dad, but the lesson he learned by the end is that he should appreciate that his father really tried his best despite his flaws because it played a role in how JD turned out as well as he did.
In Dan's case, it's different because, despite his charisma and likability, he has no excuses and no redeeming qualities, which leads to JD giving him a hefty dose of tough love. Sure, it's something Dan needed to hear because he fits the profile of "Dude who peaked in high school" to a tee, but it was surprising to see JD go on the offensive like that.
At the same time, it's not completely out of character on JD's part. Much like JD, Dan can effortlessly win people over, if not more so, but the big difference is that JD doesn't rely entirely on his likability like Dan does. Because of that, Dan would rather take the easy way out (tending bar and living with his mom) than commit to something hard like JD (living independently and pursuing a hard career).
The only frustrating aspect of this episode is that the original song that came shortly after JD tells off Dan, "Something's Always Wrong" by Toad The Wet Sprocket, was the perfect fit for the tone of the episode's ending but was then replaced with a song that does not fit nearly as well.
This actually made for one of Scrubs' best dynamics
JD's strained relationship with Dan was a recurring subplot in Scrubs. Even though the two brothers have issues, they still make time for each other at multiple points. If you thought what JD said to Dan during the Halloween episode was harsh, there's actually an episode where JD sternly tells Dan he doesn't want him in his life.
Despite Dan's shortcomings, he still loves his little brother, even with JD's constant condescension. In that same episode, he tells off Dr. Cox for negatively affecting JD's character, demanding he treat him better.
Scrubs never shied away from showing the gray area of JD's character. There was more to him than being a complete doofus and an excellent doctor. If there was one Scrubs character that brought out a nastier albeit human side of JD, it was his slacker older brother Dan.