Ten years ago, a lot of people panicked.

Lehman Bros. filed for Chapter 11 bankruptcy protection on Sept. 15, 2008. It was an epic end to a stalwart Wall Street company.

And in the aftermath of Lehman’s collapse, many investors wanted out. They understandably decided to sell their individual stocks or get out of stock funds, because they couldn’t stomach the downturn in the market. The fear was real.

We couldn’t have known back then that the stock market would roar back, and that those who stayed steady would recoup their losses and then some.

Personal finance site NerdWallet recently conducted a survey on how Americans feel the Great Recession has financially affected them a decade later. Thirty-eight percent said they are more afraid to invest in the stock market.

I invited readers to reflect on their choices during the financial crisis.

Lawrence from Detroit bolted from the stock market. When it dived, he switched some of his money out of equities.

“In retrospect, this was a mistake,” he wrote. “I sold low after having bought high, instead of the other way around. I would have been better off if I had done nothing. Still, I retained enough in equities that I recovered nicely and eventually zoomed ahead. And having a stash of safe investments gave me peace of mind. If there is a market downturn — say, in the first or second quarter of 2019 — my plan is to stand pat.”

Ellen of Patterson, New York, said she didn’t panic. “I stayed in the stock market. After four years, I was back to where I was before the crash. I’m very glad I stuck it out, because I’ve tripled my retirement savings since 2010.”

One reader pondered, “What about seniors who didn’t have 10 years to recover their losses?”

Douglas and his wife were 60 when the financial crisis hit. They were thinking about retiring.

“After [the] meltdown, we stayed put in our jobs and didn’t sell off for cash,” he wrote. “In January 2009, we sold off stocks in taxable accounts, racked up sizable paper losses, then immediately bought back in to lock in capital losses. Six years later, our new financial adviser said we were one of the few of his clients who took capital losses and bought back in. We didn’t touch our Roth or IRA accounts. Held our breath and slowly watched our position in the market go up. It was nerve wracking, but we were still working, so our income and our asset allocation (50 percent stocks/50 percent bonds) provided a safety cushion. So, we rode it out, breathed a sigh of relief at how lucky — or smart — we were and retired last year far ahead of where we were in 2009.”

And what did some people learn?

Glen Woods, 62, of Georgetown, Texas, wrote, “What I learned from the financial crisis was to always have at least one to two years of living expenses in cash or near cash.”

“The last financial crisis taught me to stay the course — the mantra I heard most of my life,” wrote Sid Kaskey from South Miami, Florida. “To keep me steady, I reviewed historical trajectory of the Standard & Poor’s 500 index and the Dow Jones industrial average. They both, over the course of decades, showed the constant march up. That visual reminder took the edge off my short-term anxiety. I do that regularly when things get scary.”

John Heenehan from Madison, New Jersey, was 54 in 2008. He says that before the crisis hit he and his wife were halfway to their retirement savings goal. They soon experienced a gut-wrenching 45 percent loss — on paper.

But: “We held on with white knuckles and resisted the desperate urge to sell,” he wrote. “I figured we wouldn’t need to tap our retirement savings for another decade, so we had time to recover. We were 100 percent in stocks and knew the risks. So while we paid the price, we also recovered our losses in just two years. About three years ago, we finally diversified and now have nearly 40 percent in bonds and cash.”

Looking back, Heenehan said he’s learned two simple lessons:

(1) “If we sell during a dropping market, we lock in our losses.

(2) “If you don’t need the money for several years, at least, dumping stocks would be akin to selling your house because its value was suddenly plummeting — and when you had no reason to move for another 10 years.”

Whatever you decided to do during the last financial crisis, look back — and then learn from your own history what’s best for your future.