Skip to content

Conversation

kawtharr25
Copy link

No description provided.

Copy link

@AthraaMosawi AthraaMosawi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done Kawthar! great job.

let personName = "ali";

console.log(personName);
let age = "15";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When declaring a variable that is meant to hold a numeric value, such as age in this case, you should assign it a numerical value directly without enclosing it in double quotation marks. Here's the corrected version of the code:
let age = 15;

console.log(personName);
let age = "15";
console.log(age);
let isHappy = "true";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing for the boolean value, you should assign it directly without enclosing it in double quotation marks. Here's the corrected version of the code:
let isHappy = true;

@@ -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";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job for naming the variables, make sure the numeric values are assigned without enclosing them in double quotation marks.

let msg = prompt("the letter");
let finalMsg = `${msg} And btw, Why are you happy?`;
console.log(`Dear ${personName.toUpperCase()}, here's your message: ${finalMsg}`)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants