From 15d8884eefcc296d95aac1e46a182fa379cfc0e4 Mon Sep 17 00:00:00 2001 From: Amir Walker Date: Thu, 27 Aug 2026 14:11:49 -0700 Subject: [PATCH] Added tip calc function --- 2-js-basics/2-functions-methods/functions-practice.js | 5 +++++ 1 file changed, 5 insertions(+) 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