Best Buy (BBY - Get Report)  somehow managed to once again sidestep the carnage in the retail sector, and is getting rewarded accordingly. 

Shares of the electronics retailer surged 21.4% to $61.22 in Thursday trading as first-quarter earnings came in at 60 cents a share, much higher than Wall Street estimates for 40 cents a share. Net sales clocked in at $8.53 billion, beating analyst forecasts for $8.28 billion. 

Best Buy's same-store sales rose 1.4% in the U.S, while online sales rose 22.5%. Wall Street probably especially liked the results in light of how challenging the electronics market was during the quarter.

On a company earnings call with analysts this morning, Best Buy CEO Hubert Joly attributed the strong revenue growth to increased sales in computing and gaming. The Nintendo Switch was an instant hit when it was released on March 3, for example.

"Potential performance pressure points were evident during the quarter, including delays in income tax refunds and hhgregg's bankruptcy and still-ongoing liquidation; however, Best Buy successfully avoided the trap of chasing low quality/margin sales," said Moody's retail analyst Charlie O'Shea in a note.

In response to an analyst's question about hhgregg's bankruptcy and liquidation, Joly said on the call that "it's always a bit choppy in the beginning" but he expects some $2 billion of home goods and appliances sales will be up for grabs.

Best Buy has beaten earnings estimates for 18 consecutive quarters now, a combination of managing Wall Street's expectations and big-time cost cuts. Aggressive repurchases of Best Buy's stock has also helped to pump up the bottom line, too.

For the second quarter, Best Buy expects revenue in the range of $8.6 billion and $8.7 billion, same-store sales to rise 1.5% to 2.5% and diluted earnings per share of 57 cents to 62 cents.

Best Buy also announced an additional $600 million in savings over the next five years.

Read More Trending Articles:

Editors' pick: Originally published May 25.