Skip to content

Commit 7e21685

Browse files
committed
fix: use Array<T> syntax consistently in exercises
- Changed array type annotation from `Product[]` to `Array<Product>` in class basics problem This ensures consistency between problem hints and solutions, reducing learner confusion.
1 parent a27559e commit 7e21685

File tree

1 file changed

+1
-1
lines changed
  • exercises/01.classes/01.problem.class-basics

1 file changed

+1
-1
lines changed

exercises/01.classes/01.problem.class-basics/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// - Method: getDescription() returns "Product: {name} - ${price}"
77

88
// 🐨 Create a ShoppingCart class with:
9-
// - Field: items (Product[])
9+
// - Field: items (Array<Product>)
1010
// - Constructor to initialize empty items array
1111
// - Method: addItem(product: Product) adds to items
1212
// - Method: getTotal() returns sum of all product prices

0 commit comments

Comments
 (0)