Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
2. Use console.log() to output the value of each variable.
********************************************************************************/
// TODO: ADD YOUR CODE BELOW

let personName="Abbas Abd Alusain";
let age=30;
let isHappy =true;
console.log(personName +'\n'+age+'\n'+isHappy);
/*******************************************************************************
Task 2 (Reassigning variables):

Expand All @@ -24,7 +27,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):

Expand All @@ -33,7 +37,8 @@
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 myFavorateMovie="resala";
let userAge;
/*******************************************************************************
Task 4 (String Concatenation):
Build upon the previous task by completing the following steps:
Expand All @@ -48,3 +53,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;
msg = prompt("Enter your Name : ");
let finalMessage=msg.concat("And btw, Why are you happy?");
console.log(finalMessage.toUpperCase());