freeCodeCamp/freeCodeCamp

Missing pantry data from the "Build a Smart Pantry Restocker" lab.

Closed

#67,720 opened on May 30, 2026

 (4 comments) (0 reactions) (0 assignees)TypeScript (44,572 forks)batch import
help wantedscope: curriculum

Repository metrics

Stars
 (444,744 stars)
PR merge metrics
 (Avg merge 6d 11h) (253 merged PRs in 30d)

Description

Describe the Issue

In the Build a Smart Pantry Restocker lab (/learn/javascript-v9/lab-smart-pantry-restocker/lab-smart-pantry-restocker), rawData and pantry array variables should be provided but they are not.

The rawData variable was recently added to the lab, thanks for this PR (https://github.com/freeCodeCamp/freeCodeCamp/pull/67614/changes) but pantry variable is still missing. Since planRestock(pantry, shipment) requires pantry as its first argument and the final integration test (The functions should work together to process a shipment and group the resulting actions.) also depends on it, campers have no starting data to work with and are left guessing what pantry should look like.

Affected Page

https://www.freecodecamp.org/learn/javascript-v9/lab-smart-pantry-restocker/lab-smart-pantry-restocker

Your code




Expected behavior

pantry array should be included so campers have example data to run and test their functions against. Based on the lab, it should be something like this.

const pantry = [
  { sku: "A10", name: "Tomatoes", qty: 4, expires: "2027-01-01", zone: "fridge" },
  { sku: "D43", name: "Pineapples", qty: 2, expires: "2020-01-01", zone: "general" }
];

Screenshots

System

  • Device: [e.g. iPhone 6, Laptop]
  • OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04]
  • Browser: [e.g. Chrome, Safari]
  • Version: [e.g. 22]

Additional context

No response

Contributor guide