CNBC's Jim Cramer told investors on Thursday that he is optimistic that the stock market will make a comeback once it faces better conditions.

The best way to make money over the long haul is by believing, not disbelieving, by owning, not renting, and taking the pain and engaging. Not hiding in the bedroom. That's why I'm here, Mad Money, the host said.

In the end, as much as I can recite the negatives about these five stocks in my sleep, I remain steadfast in my belief that after the smoke clears, they will be higher, not lower.

There are five stocks on the list.

  1. Apple
  2. Nvidia
  3. Costco
  4. AMD
  5. Alphabet (Google)

At times, these companies will not do well. They are amazing businesses with great management. Cramer said that he would give them another chance to have amazing stocks.

The major indices took smaller losses on Thursday than the day before, as investors continued to sell their holdings due to concerns that a recession is imminent.

Russia's invasion of Ukraine, Covid shutdowns in China, and more have left many industries battered. The market's tailspin has been offset by disappointing quarters from companies like Target and Cisco.

Cramer warned investors against betting on false hope earlier this week, but he still maintained that he was optimistic about finding winners in the market.

I can see a way to make things work. He said that he was not ready to throw in the towel.

Cramer's Charitable Trust has shares of Apple, Intel, and other companies.