From 684c103aa2970f764dee04e6a6b7a3243cd4a939 Mon Sep 17 00:00:00 2001 From: ASIIMWE GRACE NOBLE <137330488+GRACENOBLE@users.noreply.github.com> Date: Tue, 12 Nov 2024 08:26:50 +0300 Subject: [PATCH] fix(expense tracker): logical error in description (#7720) If we are referencing by id and not index then --id 1 would remove the first element making the summary 10 and not 20 Solution: delete the second element instead to make the summary add up correctly. --- src/data/projects/expense-tracker.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/projects/expense-tracker.md b/src/data/projects/expense-tracker.md index ffe224728..393766fdf 100644 --- a/src/data/projects/expense-tracker.md +++ b/src/data/projects/expense-tracker.md @@ -62,7 +62,7 @@ $ expense-tracker list $ expense-tracker summary # Total expenses: $30 -$ expense-tracker delete --id 1 +$ expense-tracker delete --id 2 # Expense deleted successfully $ expense-tracker summary @@ -83,4 +83,4 @@ You can implement the application using any programming language of your choice.