Halloween is a fun time of year when kids get dressed up as their favorite superheroes, princesses, ghosts, and goblins, adults attend fabulously themed parties and watch the scariest Halloween-themed movies, and decorations, galore pop up outside of houses.

RELATED: 10 Shows On Disney+ With The Best Halloween Episodes 

In the made-up world of television, series celebrate, too, with their own Halloween-themed episodes. And when it comes to sitcoms, in particular, they're always filled with plenty of joyous laughs, over-the-top costumes, and hilarious storylines. But which sitcoms have historically done the best job with Halloween-themed episodes?

New Girl

New Girl Halloween

It doesn't get better than the quirky Jess working at a haunted house on Halloween, scaring Nick, and accidentally getting punched in the face after doing so. But then there was Schmidt's Abraham Lincoln costume, too, and his big romantic gesture where he offered it to Robby so he and CeCe could match, then strutted around in his underwear, declaring that he was Matthew McConaughey in Magic Mike.

Other hilarious costumes on New Girl: Nick wearing a bee antenna and a shirt that says Arthur, declaring that he's "Bea Arthur" and Shelby's costume no one understood: dressed as a queen with stuffed cats and dogs attached to her dress, she claimed she was "reigning cats and dogs."

Brooklyn Nine-Nine

Jake wearing a crown on Halloween on Brooklyn Nine-Nine

Brooklyn Nine-Nine features annual Halloween episodes that all follow the same tradition: everyone in the 99th Precinct participates in a Halloween Heist, where the winner is crowned the Ultimate Detective/Genius, later changed to the Ultimate Human/Genius.

They pickpocket, unlock safes, tow one anothers' cars – anything to pull off the perfect heist. The crazy costumes add to the hilarity, but it's the ridiculous lengths they'll go to win that make the episodes so funny.

Modern Family

Modern Family Halloween Episode with Claire and Phill dressed up

The Dunphys took Halloween very seriously, and Claire and Phil were always determined to have the best haunted house on the block that could terrify all of the neighborhood children. One of the best moments from recent seasons: when Mitch and Cam dressed up as Prince Harry and Meghan Markle, leveraging Mitch's luscious head of red hair to add to the authenticity of the costume.

RELATED: 10 Movies To Watch This Halloween That Will Make You Sleep With The Lights On 

There was also one very emotional episode where the family said goodbye to Claire's mother DeDe. But the best Halloween episode of Modern Family was when Phil pulled off an elaborate prank to prove to Claire that he could still scare the daylights out of her.

Black-ish

Black-is Halloween Episodes

The family that wears costumes together, stays together. And The Johnsons from Black-ish went all out every Halloween to come up with clever costumes that the family could wear together. One year, they all dressed as The Incredibles. Another, it was costumes from Black Panther.

Then there was that episode about the Halloween "mischief night," where all petty crimes were legal and kids could run wild. From the Jackson 5 to mom and dad dressing as Aladdin and Jasmine once their kids became too old to Trick or Treat, the family costumes really made these episodes the best.

The Conners

The Conners Halloween Episodes

Following in the footsteps of Roseanne, for which this show serves as a revival, Halloween has always been a huge deal in the Conner household. On this new show, one of the key Halloween episode storylines followed Darlene's high school son Mark and his inability to find a costume that his school would consider to be politically correct and wouldn't offend others or perpetuate stereotypes.

True to The Conners style, the rest of the family developed unique costumes that were plays on various people, like Dan as Napolean Blown-apart, Becky as Shark-nade O'Connor, Harris as Lizzie Boredom, and Mary as Scary J. Blige.

How I Met Your Mother

How I Met Your Mother Halloween Episodes

The Halloween episodes of How I Met Your Mother introduced the character of The Slutty Pumpkin, eventually played by Katey Holmes. The rooftop party in the building was an iconic one every year, with various costumes being featured, from Ted's hanging chad, which he would wear every year in hopes of running into the mysterious girl in the pumpkin costume again, to Barney's ever-changing costumes so he could pick up multiple women on the same night.

RELATED: Disney Channel: The 10 Best Halloween Movies, According To IMDb 

And let's not forget the time Ted dressed as a hot dog, both while teaching a class and at the GNB Halloween office party. Barney, meanwhile, dressed as Johnny Lawrence from The Karate Kid, who he argued was actually the hero, not the villain, of the film.

Friends

Friends Halloween Episodes

Three words: Chandler, pink bunny. It was super hilarious, and only made better when Joey showed up to the same party dressed as Chandler! Or so viewers thought. Because then there was Ross and his puzzling spud-nik costume that no one really got. It was a potato with a space satellite but, well, it looked a lot like something else.

Friends'  memorable Halloween episode, "The One With the Halloween Party," also featured a cameo by Sean Penn, who's character was dating Phoebe's twin sister Ursula at the time.

The Office

The Office Halloween Episodes

Leave it to a bunch of mundane office workers to come up with the most boring and ridiculously simple yet funny costumes. Slap three black circles on the side of your buttoned shirt and voila! According to Jim, he was a three-hole punch.

The season seven Halloween episode of The Office was centered around a Costume Contest. There's also that time that Dwight wore a jack-o'-lantern on his head as a costume, then found himself in a pickle when he couldn't get it off. And when Michael, tasked with firing one employee by the end of the month, wore a paper mache second head of himself.

The Simpsons

The Simpson Treehouse of Horrors

No show does Halloween better than The Simpsons, which does a full-on Halloween episode every year. It's usually a parody of an iconic horror film.

The episodes even have their own names under the Treehouse of Horror moniker, which turns the typically funny animated show into something that will make you cringe and maybe even jump out of your seat a little, though the episodes still feature the typical Simpsons irreverence.

Curb Your Enthusiasm

Curb Your Enthusiasm Halloween episode

They're the perfect anti-Halloween episodes. Rather than hand out candy to excited kids on Halloween, Larry David, who plays a fictional and embellished version of himself on Curb Your Enthusiasm, decides to school them for allegedly trying to rig the system.

While his house might be one where you'd expect to get full-sized candy bars and a smile, the kids have no idea what they're in for when they knock on the door looking for treats.

NEXT: 10 Best Horror TV Shows To Get You In The Halloween Spirit (Ranked BY IMDb)