Here's a look at how they answered:
Biden interrupted by protests in the debate hall
Former Vice President Biden was interrupted by protesters as he began to discuss the most significant professional setback he's faced.
It was not immediately clear what the protesters were shouting.
"My dad had an expression. He said, 'Joey, it's not a question of succeeding, whether you get knocked down, it's how quickly you get up,' and he said, 'You never explain and never complain,'" Biden said after the protesters were removed from the debate hall.
Warren, Sanders and Harris show resiliency through their personal backgrounds
Massachusetts Sen. Elizabeth Warren, taking the final question on personal resiliency, said, "I've known what I wanted to be since second grade. I wanted to be a public school teacher...By the time I graduated from high school, my family didn't have money for a college application, much less to send me off to four years at a university...I made it as a special needs teacher."
She continued: "Here's resilience. I said, 'I'll go to law school.' I practiced law for about 45 minutes and then went back to my first love, which is teaching...the reason I'm standing here today is because I got back up, I fought back."
Vermont Sen. Bernie Sanders talked about his upbringing in a rent-controlled apartment in Brooklyn, New York, and his unlikely political rise to the U.S. Senate.
"Resilience, to me, means growing up in a rent-controlled apartment in Brooklyn, New York, the son of an immigrant who came to this country without a nickel in his pocket. Professional resilience means to me, George, running for U.S. Senate in Vermont and getting 1% of the vote," Sanders said in response to ABC News Chief Anchor George Stephanopoulos' question.
California Sen. Kamala Harris answered by ticking through her many uphill battles on her way to becoming a U.S. Senator: "I was the only black elected woman -- black elected attorney general in the state, in the country. And each time, people would say, it's not your time, it's not your turn, it's going to be too difficult, they're not ready for you, and I didn't listen."
Yang highlights his struggles with entrepreneurship
"I was an unhappy lawyer for five whole months and I left to start a business," Andrew Yang began. "My company flopped. I lost investors, hundreds of thousands of dollars, still owed $100,000 in school debt. My parents still told people I was a lawyer."
But he said he persisted: "I kept working in small growth companies for another ten years and eventually had some success. After I had some success, I still remembered how hard it was."
Yang pointed to one of his guests in the audience, Shawn Wynn, a young entrepreneur who was supported by Yang's nonprofit, Venture for America. He told him he hoped his path was a little bit easier than his own.
Buttigieg gets candid about coming out and the struggles afterwards
South Bend, Indiana, Mayor Pete Buttigieg, who is openly gay, got candid about his decision to come out and the response he got afterwards.
"As a military officer serving under 'don't ask, don't tell,' and as an elected official in the state of Indiana when Mike Pence was governor, at a certain point, when it came to professional setbacks, I'd wonder whether just acknowledging who I was was going to be the ultimate career-ending professional setback," Buttigieg said.
"I had no idea what kind of professional setback it would be, especially because inconveniently, it was an election year in my socially conservative community. What happened was that when I trusted voters to judge me based on the job that I did for them, they decided to trust me and re-elected me with 80% of the vote," he added.
Booker reflects on his political legacy, O'Rourke invokes El Paso's resiliency
Reflecting on resiliency, Sen. Cory Booker and former Texas Congressman Beto O'Rourke shared the stories of the communities that they call home.
"My biggest professional setback is embarrassing because a lot of folks know about it. I, with a bunch of tenant leaders in Newark, New Jersey, in 2002 took on the political machine, and boy did they fight back," Booker said.
"The lesson I learned of resilience is to trust people because the power of the people is always greater than the people in power. And the test of America right now is not a referendum on Donald Trump, it's a referendum on us and who we are and who we're going to be together," Booker said.
O'Rourke told the story of a soccer coach who was shot in El Paso last month and his desire to continue to do his job and spoke to the city's ability to come together in the face of tragedy.
"Everything that I've learned about resilience I've learned from my hometown of El Paso, Texas. In the face of this act of terror that was directed at our community, in large part by the president of the United States, that killed 22 people and injured many more, we were not defeated by that, nor were we defined by that," O'Rourke said.
Klobuchar, Castro highlight family history in closing question
Minnesota Sen. Amy Klobuchar highlighted her struggles with her father's alcoholism as the catalyst for leading her into public service.
"My challenges and resilience have brought me up here," she said. "I grew up with a dad who struggled with alcoholism his whole life and after his third DWI, he had a choice between jail and treatment. He chose treatment...And that made me interested in public service because I feel like everyone should have that same right, to be pursued by grace."
Former Housing and Urban Development Secretary Julián Castro talked about growing up in a single-parent household to talk about his resiliency, "I shouldn't be here on this stage. You know, Castro is my mother's name and was my grandmother's name before her. I grew up in a single-parent household on the west side of San Antonio, going to the public schools."
He added: "There's nobody that gets tested more in a position of public trust than the president of the United States. This president has failed that test. But I want you to know that if you elect me president, I won't."
ABC News contributed to this report.