The Janitor is the main and true antagonist of Scrubs. He is J.D.'s arch-nemesis.
He was portrayed by Neil Flynn.
The Janitor, whose real name is not revealed until the series finale, goes out of his way to make J.D.'s life miserable; he insults him, humiliates him, and pulls elaborate pranks that often result in J.D. being injured. Their feud begins on J.D.'s first day at the hospital, when the Janitor accuses him of jamming a door by sticking a penny in it. (It is later revealed that J.D. did in fact accidentally stick a penny in the door and lied about it, and that the Janitor's subsequent torment was punishment for failing a "test of character"). The Janitor seems to base his entire life around antagonizing J.D., to the point that he he abruptly quits his job upon learning that J.D. has left the hospital for good.
The Janitor is also prone to telling wild, elaborate lies about himself, including stories about having a "brother-dad", a "sister-mom", and a wife with only a forefinger and "thumb-pinky" on each hand. He also claims to have gone to Harvard, had a brief relationship with Amy Carter, learned sign language from a monkey that subsequently died of cancer, and that he invented the phrase "delusions of grandeur". (Flynn, an improvisational comedian, often went off script and made these stories up off the top of his head.)
Despite the Janitor's antagonism toward virtually every character on the show, he is not without redeeming qualities. He has genuine feelings for Dr. Elliot Reid and goes out of his way several times to help her, and shows compassion for patients, such as spending the day talking to a patient with Locked-In Syndrome when the man's computer-modulated artificial voice breaks. In the show's final season, he meets a woman named Lady who not only tolerates his quirks but loves him for them, and they get married.
Origin as imaginary character
The Janitor was originally meant to be a figment of J.D.'s imagination; in the first season, no one interacts with or notices him but J.D. By the second season, however, Janitor began interacting with other characters.
The first time that the Janitor interacts with another major character besides J.D. is in the season two episode "My Karma", in which he blackmails J.D. and Turk. From the beginning of Season 2, Flynn joins the rest of the main cast appearing in the show's extended opening credits, but the credits were changed back due to objections by NBC, who wanted longer episodes instead. Flynn has not been represented in the credits since. However, he was still acknowledged as a main cast member by the producers as of the second season. Since the start of season two, Janitor has had encounters with most of the other regular characters. He has even had an entire episode ("His Story III") devoted mostly to him.