One of Scrubs' most valuable players was The Janitor (Neil Flynn), but the character was originally planned to be part of J.D.'s imagination. That's actually so surprising since Scrubs was well-known for its lead character launching into often fantastical daydreams at a moment's notice. J.D. certainly liked being a doctor at Sacred Heart Hospital, but that didn't stop him from keeping in touch with his inner child - or in some cases, his inner immature adult.

While Braff capably served as Scrubs' center from the pilot "My First Day" onward, over the years the sitcom became more and more of an ensemble, eventually even having episodes that didn't feature J.D.'s voiceovers or point of view of the events taking place, allowing other characters time in the limelight. This did eventually include The Janitor in season 5's "His Story III," which is quite a feat for a character not included in the original opening credits sequence or not even given a name until season 8.

Related: Why Scrubs Was Canceled After Season 9

As essential a piece of Scrubs' puzzle that Flynn's Janitor became - with Flynn himself going on to lead long-running sitcom The Middle - he wasn't originally intended to be a permanent fixture. In fact, creator Bill Lawrence originally planned to reveal he wasn't real at all.

Scrubs' Janitor Was Imaginary Until He Wasn't

Scrubs JD and Janitor Cropped

While Scrubs creator Bill Lawrence (who also created Ted Lasso) is proud of the show it became, he didn't initially believe it would last very long on NBC. At most, Lawrence figured it would last two seasons, then be canceled. Considering lots of sitcoms as quirky as Scrubs suffered that exact fate or worse, it's fair Lawrence thought it might do the same. With that in mind, Lawrence's original intention with The Janitor character was that he not be a real person, but instead live entirely within the mind of J.D. The big reveal The Janitor was imaginary would've come in season 1's finale.

To Lawrence's surprise though, Scrubs did better for NBC than he expected, and before season 1 was done filming, the network picked up Scrubs season 2. At that point, Neil Flynn, who was billed as a guest star but ended up appearing in every episode of season 1, asked Lawrence to allow him to interact with the rest of the cast. That's why Janitor doesn't have any direct communication with any of the main cast other than J.D. until later in season 1. At that point, the imaginary Janitor idea was dropped completely, and Flynn was promoted to series regular in season 2, leaving Sam Lloyd's sad-sack lawyer Ted to become the best recurring guest star. That's a good thing too, as Flynn would go on to have memorable interactions with many other characters besides his arch-nemesis J.D., and his improv comedy skills led to some of Scrubs' funniest scenes.

More: Michael J. Fox Was Scrubs' Greatest Guest Star