-
Notifications
You must be signed in to change notification settings - Fork 23
saw the task #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
saw the task #16
Conversation
There was a problem hiding this 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"; |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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}`) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great!
No description provided.