From 47562b15ae343285aebb5621bfc2b60b79ef4856 Mon Sep 17 00:00:00 2001 From: kawtharr25 Date: Wed, 7 Feb 2024 20:17:15 +0300 Subject: [PATCH] saw the task --- variables.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/variables.js b/variables.js index 2d8a281..589c8a0 100644 --- a/variables.js +++ b/variables.js @@ -15,6 +15,14 @@ 2. Use console.log() to output the value of each variable. ********************************************************************************/ // TODO: ADD YOUR CODE BELOW +let personName = "ali"; + +console.log(personName); +let age = "15"; +console.log(age); +let isHappy = "true"; + +console.log(isHappy); /******************************************************************************* Task 2 (Reassigning variables): @@ -24,7 +32,8 @@ 2. Use console.log o output the value of 'nickName' *******************************************************************************/ // TODO: ADD YOUR CODE BELOW - +let nickName = personName; +console.log(nickName); /******************************************************************************* Task 3 (Naming variables): @@ -33,6 +42,9 @@ 2. Declare a variable that stores the age of a user. What name would you choose for this variable? *******************************************************************************/ // TODO: ADD YOUR CODE BELOW +let favoriteMovie = "lion"; +let userAge = "20"; + /******************************************************************************* Task 4 (String Concatenation): @@ -48,3 +60,7 @@ Steps: - Print the final message to the console, including the personName in uppercase in this format `Dear personName_VALUE, here's your message: finalMsg_VALUE.`. *******************************************************************************/ // TODO: ADD YOUR CODE BELOW +let msg = prompt("the letter"); +let finalMsg = `${msg} And btw, Why are you happy?`; +console.log(`Dear ${personName.toUpperCase()}, here's your message: ${finalMsg}`) +