From e318946e36a718819c8e02b403634ce0f46383c1 Mon Sep 17 00:00:00 2001 From: Shukri Abdi Date: Mon, 1 Jul 2024 23:55:37 +0300 Subject: [PATCH] Functions: Continued --- index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/index.js b/index.js index c44a93222..cbb2a705f 100644 --- a/index.js +++ b/index.js @@ -1 +1,17 @@ // code your solution here +function saturdayFun(activity = "roller-skate"){ + return `This Saturday, I want to ${activity}!`; +} +const mondayWork = function(activity = "go to the office") { + return `This Monday, I will ${activity}.`; +}; +function wrapAdjective(wrapper = "*") { + return function(adjective = "special") { + return `You are ${wrapper}${adjective}${wrapper}!`; + }; +} + +const encouragingPromptFunction = wrapAdjective("!!!"); +console.log(encouragingPromptFunction("a dedicated programmer")); + +console.log(wrapAdjective("%")("a dedicated programmer"));