Skip to content

Commit bd1daeb

Browse files
Merge pull request #1678 from ak-sh-at/billtip
bill tip calculator modified
2 parents 75b2938 + 8664d58 commit bd1daeb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • Projects/bill tip calculator

Projects/bill tip calculator/app.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ function calculateTip() {
1111
alert("Please enter bill amount.");
1212
return;
1313
}
14+
if(billAmount<0)
15+
{
16+
alert("Please enter positive bill amount");
17+
return;
18+
}
1419

1520
// Calculate the total tip.
1621
function tipCalc() {

0 commit comments

Comments
 (0)