Skip to content

saw the task#16

Open
kawtharr25 wants to merge 1 commit into
TheCodePeople:mainfrom
kawtharr25:main
Open

saw the task#16
kawtharr25 wants to merge 1 commit into
TheCodePeople:mainfrom
kawtharr25:main

Conversation

@kawtharr25
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@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.

Comment thread variables.js
let personName = "ali";

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

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;

Comment thread variables.js
console.log(personName);
let age = "15";
console.log(age);
let isHappy = "true";
Copy link
Copy Markdown

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;

Comment thread variables.js
*******************************************************************************/
// TODO: ADD YOUR CODE BELOW
let favoriteMovie = "lion";
let userAge = "20";
Copy link
Copy Markdown

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.

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

Copy link
Copy Markdown

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