Walmart is offering its employees homework in its ongoing battle with online retailers like Amazon.

The nation's largest retailer announced it will begin asking employees to deliver packages on their way home after work. The company is testing the employee deliveries at two stores in New Jersey and one in Arkansas.

"The best part is this gives our own associates a way to earn extra income on their existing drive home," Marc Lore, president and CEO of Walmart U.S. eCommerce wrote in a blog post on the company's website.

It was not clear whether associates would be compensated for gas or if insurance would be covered.

The company said since it already has trucks moving orders from fulfillment centers to stores for pickup, "those same trucks could be used to bring ship-to-home orders to a store close to their final destination, where a participating associate can sign up to deliver them to the customer's house."

Walmart, which has 4,700 stores across the country and more than 1 million associates, said the program is voluntary.

If workers choose to sign up, however, the company said it has built in technology that would allow associates to set various preferences, like choosing how many packages they deliver and which days they're able to make deliveries after their shifts.

"It's completely up to them," Lore wrote, "and they can update those preferences at any time."

Walmart noted that it has a location every 10 miles for 90 percent of the U.S. population.

"Now imagine all the routes our associates drive to and from work and the houses they pass along the way," Lore wrote. "It's easy to see why this test could be a game-changer."

Spencer Kent may be reached at skent@njadvancemedia.com. Follow him on Twitter @SpencerMKent. Find the Find NJ.com on Facebook.