Skip to content

Commit

Permalink
Appropriate comment
Browse files Browse the repository at this point in the history
Added an clearer comment to my conditional for positive or negative balance on pay function
  • Loading branch information
vara-co authored Oct 30, 2024
1 parent df3e158 commit 9c1ea8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion starter/src/assets/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function pay(amount) {
// Remaining balance calculation
const remaining = totalPaid - ttlCost;

// Conditional
// Conditional to calculate positive or negative balance
if (remaining < 0) {
return remaining;
} else {
Expand Down

0 comments on commit 9c1ea8e

Please sign in to comment.