SAN FRANCISCO, CA - JANUARY 04:  Amazon Prime boxes are seen in a bundle of recycled cardboard at Recology's Recylce Central on January 4, 2018 in San Francisco, California. Recycle centers are seeing a spike in cardboard recycling following the holidays after a record year for online retailers. The U.S. Postal Service estimates that they delivered ten percent more packages in 2017 with Amazon shipping over five billion items for Prime members.  (Photo by Justin Sullivan/Getty Images)
Justin Sullivan/Getty Images
SAN FRANCISCO, CA - JANUARY 04: Amazon Prime boxes are seen in a bundle of recycled cardboard at Recology's Recylce Central on January 4, 2018 in San Francisco, California. Recycle centers are seeing a spike in cardboard recycling following the holidays after a record year for online retailers. The U.S. Postal Service estimates that they delivered ten percent more packages in 2017 with Amazon shipping over five billion items for Prime members. (Photo by Justin Sullivan/Getty Images)
Now playing
01:00
Retailers in the age of Amazon: Adapt or die
Getty Images
Now playing
02:18
This airplane-shaped bag is selling for more than some actual planes
Now playing
00:54
See Nike's new 'hands-free' shoe
One of many large boxes of returned products that fill the warehouse. The returned products in this box will eventually be sorted and categorized.
John General/CNN
One of many large boxes of returned products that fill the warehouse. The returned products in this box will eventually be sorted and categorized.
Now playing
05:08
Here's where your 'free' online returns actually end up
Shutterstock
Now playing
04:42
Ever receive a package you didn't order? It could be a scam
Orangetheory Fitness
Now playing
02:13
This gym is actually opening studios during the pandemic
Now playing
02:24
How holiday spirit is surging despite the Covid-19 pandemic
NEW YORK, NEW YORK - NOVEMBER 19: A view of the window display as Macy's Herald Square unveils Give, Love, Believe 2020 Holiday Windows on November 19, 2020 in New York City. (Photo by Eugene Gologursky/Getty Images for Macy's)
Eugene Gologursky/Getty Images North America/Getty Images for Macy's
NEW YORK, NEW YORK - NOVEMBER 19: A view of the window display as Macy's Herald Square unveils Give, Love, Believe 2020 Holiday Windows on November 19, 2020 in New York City. (Photo by Eugene Gologursky/Getty Images for Macy's)
Now playing
00:56
Macy's unveils holiday window display with gratitude theme
CNN/Target/Design by John General
Now playing
02:36
It's official: Black Friday is irrelevant
Now playing
02:23
Party City CEO: Consumers still want to celebrate together
NEW YORK, UNITED STATES - 2020/07/08: People wearing face masks shopping inside a retail store in Manhattan as the city enters phase 3 of reopening amid the coronavirus pandemic
As New York City enters phase 3 of reopening retail stores for indoor shopping, restaurants have been postponed for indoor dinning. The U.S. Department of Health recorded a total of 3,219,999 infections, 135,822 death and 1,426,428 recovered since the beginning of the outbreak. (Photo by Braulio Jatar/SOPA Images/LightRocket via Getty Images)
Braulio Jatar/SOPA Images/LightRocket/Getty Images
NEW YORK, UNITED STATES - 2020/07/08: People wearing face masks shopping inside a retail store in Manhattan as the city enters phase 3 of reopening amid the coronavirus pandemic As New York City enters phase 3 of reopening retail stores for indoor shopping, restaurants have been postponed for indoor dinning. The U.S. Department of Health recorded a total of 3,219,999 infections, 135,822 death and 1,426,428 recovered since the beginning of the outbreak. (Photo by Braulio Jatar/SOPA Images/LightRocket via Getty Images)
Now playing
01:38
US retail sales improved in September
thehouseofdrew.com
Now playing
02:01
Justin Bieber's footwear collaboration overwhelms site
Walmart
Now playing
01:01
See what's new inside Walmart stores
3119 E Third Street Dollar General in Dayton, OH on March 12, 2020.
Maddie McGarvey for CNN
3119 E Third Street Dollar General in Dayton, OH on March 12, 2020.
Now playing
06:07
Dollar General's business is booming. It's also vulnerable to crime, police say
Now playing
03:01
How private equity is gutting retail
Now playing
01:55
All retail bankruptcies are not the same. Here's what you need to know
(CNN Business) —  

Best Buy got a big assist during the holidays from Americans who splurged on Apple watches and Amazon Echo devices.

The electronics retailer — one of the handful of legacy brick-and-mortar giants that is thriving in the Amazon era — said Wednesday that sales at stores open for at least a year rose 3% during its most recent quarter compared with 2018. That beat Wall Street expectations. Best Buy has posted at least 3% sales growth in every quarter for nearly two years.

The company’s profit also exceeded expectations. Best Buy’s (BBY)stock jumped 16% in early trading.

CEO Hubert Joly told analysts Wednesday that Best Buy’s “improved experience” in stores and online resonated with customers.

Like Walmart (WMT), which reported earnings last week, Best Buy was lifted by strong consumer spending and low unemployment. Walmart (WMT)’s sales at US stores open at least a year during its most recent quarter increased 4.2% compared with last year. Best Buy and Walmart (WMT) have staved off pressure from Amazon by investing heavily in their stores and ramping up efforts online.

Under Joly, Best Buy has poured money into making its stores into a destination for shoppers and vendors like Amazon (AMZN), Apple (AAPL), and Samsung.

Best Buy’s 1,000 stores also act as warehouses, from which the company can quickly ship deliveries to customers and collect their online pickup orders. The company’s online sales grew 9% in its most recent quarter. And close to a fourth of its annual sales are made online.

In recent years, Best Buy has also focused on service, helping customers with tech questions. It has rolled out In-Home Advisor, a home tech consultation service, and Total Tech Support, an annual membership for on-demand help and repairs.

Last year, Best Buy acquired GreatCall, the maker of the Jitterbug cellphone with big buttons for elderly citizens. The company now sells that product in its stores.

Joly told analysts that those programs help Best Buy differentiate from competitors. Best Buy’s sales in its service unit increased nearly 14% during the holidays compared with last year.

Wearables, appliances, smart home devices and gaming products were Best Buy’s top-selling categories over the holidays. Appliances were a particular bright spot: Sales in that category increased 8.5% during the holidays.

Apple’s iPhone struggles plagued Best Buy, though. The tech company’s iPhone revenue fell 15% during the holidays compared with last year. That weighed on Best Buy, since its phone division slowed down.

In 2019, Best Buy plans to expand its business in health technology for sleep and fitness. Joly added that the company thinks digital health is an “enormous opportunity.”