Toys "R" Us is closing its doors after 70 years in business.

It marks the end for a company that sold toys, bikes, video games and birthday presents to millions of American kids. For half a century, Geoffrey the mascot giraffe invited children to its giant playhouses. Legions of adults who came of age in the 1980s and 1990s can probably still whistle the jingle: "I'm a Toys 'R' Us kid."

Yet Toys "R" Us fell victim to the strong currents pulling specialty retailers into oblivion. Walmart, Target and other big-box retailers — stores that offered aisles of toys and everything else, too — began to erode its dominance. And then the emergence of Amazon sped its demise.

Toys "R" Us will shut or sell all of its 735 stores in the United States, according to court documents filed early Thursday. About 31,000 workers in the United States will be laid off.

In September, Toys "R" Us filed for bankruptcy, hoping to shed debt and reinvest in its stores. At the time, Toys "R" Us disclosed that it had about $5 billion in debt and was spending about $400 million a year just to service it.

The turnaround didn't work. In January, the company said it would close 182 stores across the United States.

In a bankruptcy court filing Thursday, Toys "R" Us said it had a horrific holiday season, "well below worst case projections." It earned just $81 million in pre-tax profit in the fourth quarter, $250 million below the company's target and a quarter of what it earned a year earlier.

Do you work at Toys "R" Us? We want to hear from you

The company said it would have to spend several hundred million dollars just to keep its remaining stores open through the end of the year. That's a problem because Toys "R" Us is already burning nearly $100 million per month. Meanwhile, no buyer has come forward to save Toys "R" Us, and the company acknowledged its creditors are getting antsy.

Toys "R" Us said it realized its plan to stay in business through the 2018 holiday season wouldn't work.

"The stark reality" is that the company will run out of cash in the United States in May, the company noted in its filing. So it determined the best way to pay back its creditors is to liquidate the remaining inventory in its remaining US stores.

"Everything is up for sale," Toys "R" Us CEO David Brandon told employees on a conference call Wednesday, according to a recording obtained by CNNMoney. "All of these assets are available. Someone can literally buy these assets, and if they are willing to pay one more dollar than the liquidation value of these assets then in fact it could be of interest."

Related: Meet the woman who wrote the Toys 'R' Us jingle

Toys "R" Us did not say when it would close the stores, but they will probably stay open for at least two months. The company has filed store closure notices that require a 60-day wait before it can shut them down. Toys "R" Us also told its 31,000 US employees that they will be laid off.

"That's horrible news, but that's the way it is," Brandon said on the call.

The company hopes to remain alive outside the United States. It said many of its stores in Canada, Europe and Asia "remain strong, viable businesses," and may be saved or sold. On Wednesday, Toys "R" Us said it was closing all its stores in the UK.

Toys "R" Us hopes to sell its much stronger Canadian business and run the company from that country. It is currently based in Wayne, New Jersey.

Brandon said a buyer of the Canadian business could choose to purchase the 200 best-performing US stores and keep them operational. But that's far from certain.

Toys "R" Us hasn't made a full-year profit since 2012 and has lost $2.5 billion since then. It reported a loss of $953 million in the first nine months of last year alone. Sales during the recent holiday period, which the company has yet to report, are believed to have been very bad.

The company was taken over by private equity giants KKR, Bain Capital and real estate investment company Vornado in 2005. Together they paid $6.6 billion, but saddled the company with $5.3 billion in debt.