AI

Loops let you repeat code. Let's count how many items are in stock.

Your Task:

  • Create a variable count starting at 0
  • Loop through products array
  • If product.inStock is true, increment count
TypeScript Solution
Loading...

Submit your code to see test results