diff --git a/2-js-basics/2-functions-methods/functions-practice.js b/2-js-basics/2-functions-methods/functions-practice.js index 313bf7c91..f97c43b57 100644 --- a/2-js-basics/2-functions-methods/functions-practice.js +++ b/2-js-basics/2-functions-methods/functions-practice.js @@ -31,3 +31,8 @@ function createFullName(firstName, lastName) return FullName; } +function calculateTip(billAmount, tipPercentage = 15) +{ + Tip = billAmount * (tipPercentage/100); + return Tip; +} \ No newline at end of file