John F. Kennedy had his fair share of glib rejoinders, and George W. Bush had his infamous verbal malapropisms, but few occupants in the White House have been praised for their comedic timing and skill as consistently as Barack Obama.

Even many of his harshest critics would likely agree that his acerbic annual White House Correspondents' Dinner monologues are must-see TV. And in this age of viral videos and unconventional new modes of communication, Obama has mastered the art of using humor to humanize himself and advance his agenda.

US President Barack Obama tells jokes during the White House Correspondents Association Dinner on May 2, 2014 in Washington, DC. AFP PHOTO/Jewel SamadJEWEL SAMAD/AFP/Getty Images JEWEL SAMAD / AFP - Getty Images

Before Obama, presidents didn't go on late night TV, let alone tweet or Instagram. Those last two terms didn't even exist more than a decade ago. And while he has caught some flak for participating in memes and moments that some pundits believed were unbecoming of his office, Obama's supporters saw his gift for the GIF-worthy as one of his most appealing qualities.

As the nation bids farewell to this historic and consequential commander-in-chief, here is a look back at some of the hilarious highlights of his eight years in the Oval Office.

Late Night Laughs

President Obama made history in 2009, shortly after his inauguration, when he became the first sitting president to appear on a late night television show, but his most memorable bit may be his sit-in with Jimmy Fallon's house band The Roots to "slow jam the news." Using his signature baritone, Obama made the case for health care reform with tongue planted firmly in cheek.

This cameo was followed by a memorable appearance on Jimmy Kimmel's show, where Obama read some of the "meanest" tweets about him out loud.

On Stephen Colbert's late night show, the president subjected himself to a kind of surreal faux job interview in which the costumed host chided him for not having received a promotion in eight years. "Honestly, there wasn't a lot of room for advancement in my last job," Obama quipped. "The only one with a powerful position was my wife."

In one of his most recent appearances, he made TBS' Samantha Bee the first female late night host to have a sit-down with a sitting president. The discussed a frequent topic of ridicule — his rapidly graying hair.

And Obama's guest spots have no longer been limited to traditional shows. He delivered a droll performance opposite comedian Zach Galifianakis in the hard-to-categorize web series "Between Two Ferns."

The president also got behind the wheel to take comedy legend Jerry Seinfeld for a spin on a special episode of "Comedians in Cars Getting Coffee."

.@JerrySeinfeld @POTUS

1963 Corvette Stingray

And a cup of coffee



Here's what happened next. https://t.co/RIJqFqB0f4 — The White House (@WhiteHouse) December 31, 2015

Self-Deprecation Is His Specialty

A recurring theme in all of these appearances is the president's willingness to poke fun at himself. Although he is by all accounts a supremely confident person, Obama has shown a knack for mocking his own shortcomings (his perpetual lateness), controversies ("birther" jokes), and his allegedly aloof manner.

In one of his most memorable White House Correspondents' Dinner performances, Obama sought the aide of comedian Keegan Michael-Key to recreate a popular sketch from his "Key and Peele" series in which Key plays "Luther" an "anger translator" for a fictional version of the president.

In a comic twist, Obama eventually became too volatile for even Luther's taste.

Obama is also not above calling out his own cornball antics. To the chagrin of his daughters Malia and Sasha, his purposefully bad puns regularly took center stage during the annual Thanksgiving presidential turkey pardons.

And he can be humble, too. In 2014, for instance, he volunteered at a Washington D.C. school on September 11th and a sixth grade girl told him she'd initially wished that Beyoncé had come to visit instead. “I understand,” Obama deadpanned.

Roasting the Opposition

Still, the president may be at his best when he uses humor to disarm his most vicious critics, perhaps never more memorably than when he took on then-real estate mogul Donald Trump at the White House correspondents dinner in 2011 while the Republican was in attendance.

Related: Obama Roasts Trump, Drops Mic at Last White House Correspondents' Dinner

In one of his most biting performances, Obama skewered Trump for his dogged pursuit of conspiracy theories involving his birthplace and attempts to tout himself as a credible political leader.

Obama, who had days earlier begrudgingly released his full-length birth certificate in part to quash Trump's crusade, joked that Trump could now focus "on the issues that matter — like, did we fake the moon landing? What really happened in Roswell? And where are Biggie and Tupac?"

And the president wasn't finished with The Donald yet. "We all know about your credentials and breadth of experience ... just recently, in an episode of 'Celebrity Apprentice' at the steakhouse, the men’s cooking team did not impress the judges from Omaha Steaks," the president said. "And there was a lot of blame to go around. But you, Mr. Trump, recognized that the real problem was a lack of leadership. And so ultimately, you didn’t blame Lil’ Jon or Meatloaf. You fired Gary Busey."

"And these are the kind of decisions that would keep me up at night," Obama quipped.

Trump earned some of the biggest laughs at Obama's final, raucous White House Correspondents' Dinner." Is this dinner too tacky for The Donald?" he asked about the then-candidate, who skipped that year's festivities. "What could he possibly be doing instead? Is he at home, eating a Trump steak, tweeting out insults to Angela Merkel? What's he doing?"

Ironically, it was Trump who got the last laugh — by winning the presidency in a shocking upset six months later.