Skip to content

Conversation

@azizomarck
Copy link

No description provided.

/* I believe there are different ways to store the object cat,
one different way I would do is not creating any nest objects
*/
let cat = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Well done!


//8.
console.log("Question 8. ")
console.log(" if the equation is x=x%3, the the value of x must be either 0,1 or 2" );
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you missed the initial value of x = 7. The question was:

  1. If x equals 7, and the only other statement is x = x % 3, what would be the new value of x?

console.log("The value of age should be undefined at this point,because it has not been assigned a value,thus, JS assigns the primitve value undefined to it ")
console.log("The value of age is : " + age);
age = 22;
console.log("The value of age should be 2 " );
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you make a typo for the value of age?

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.

3 participants