Pedestrians walk in front of a Shake Shack location in New York.

Shake Shack on Monday reported quarterly earnings and revenue that beat analysts' expectations, but the company disappointed investors with a weaker outlook for same-store sales growth.

Shares of the company whipsawed after the market's close, first rising nearly 4 percent before dropping more than 2 percent.

Here's what the company reported compared with what Wall Street was expecting, based on a survey of analysts by Refinitiv:

Earnings per share: 6 cents, adjusted, vs. 3 cents expected

Revenue: $124.3 million vs. $118.8 million expected

During the fiscal fourth quarter, Shake Shack narrowed its net loss to $548,000, or 3 cents a share, from a net loss of $11.03 million, or 47 cents a share. On an adjusted basis, the company's pro forma earnings were 6 cents per share, topping the 3 cents per share expected by analysts surveyed by Refinitiv.

Net sales rose 29.3 percent to $124.3 million, beating expectations of $118.8 million. Same-store sales grew by 2.3 percent during the quarter, driven by a 2.6 percent price increase. Wall Street was expecting a decline of 1.2 percent.

Shake Shack opened 20 locations during the quarter, 17 of which are domestic company-operated stores.

For 2019, the company is forecasting same-store sales that are flat to up 1 percent. That outlook reflects the impact of the 1.5 percent in price increases that the company put in place in December.

Shake Shack's projected revenue for this year is between $570 million and $576 million. Analysts were expecting the company to see $576 million in sales in 2019.

Chief Financial Officer Tara Comonte told analysts on the conference call that some locations are experiencing a sophomore slump after high traffic initially. The company counts stores open at least 24 months in its same-store sales metric.

The burger chain plans to open as many as 58 locations, both company-operated and licensed, in 2019. The New York-based company also is continuing its global expansion this year, with locations for the first time in mainland China, Singapore, the Philippines and Mexico. The company will open its first international office in Hong Kong later this year to support its Asian-focused growth.

The company also released its outlook for 2020, targeting at least 320 new locations and more than $700 million in revenue.