From df8dcccd555d5de77099977cc2d7ab36dbb3cfac Mon Sep 17 00:00:00 2001 From: Amir Walker Date: Thu, 27 Aug 2026 14:01:33 -0700 Subject: [PATCH] Wrote greetPerson --- 2-js-basics/2-functions-methods/functions-practice.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/2-js-basics/2-functions-methods/functions-practice.js b/2-js-basics/2-functions-methods/functions-practice.js index e476c2baa..8341916fa 100644 --- a/2-js-basics/2-functions-methods/functions-practice.js +++ b/2-js-basics/2-functions-methods/functions-practice.js @@ -4,6 +4,10 @@ function sayHello(){ } -function introductYourself(name){ - console.Log(`Hi, my name is ${name}`) +function introduceYourself(name){ + console.Log(`Hi, my name is ${name}`); +} + +function greetPerson(name, greeting='Hello' ){ + console.Log(`${greeting}, ${name}!`); } \ No newline at end of file