-
Notifications
You must be signed in to change notification settings - Fork 10
Week 6 Submission #12
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: master
Are you sure you want to change the base?
Conversation
epq
left a comment
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 work!
| @@ -0,0 +1,4 @@ | |||
| //Q-13: Create two variables -- one to hold the names of the kittens and one to hold the names of the adult cats. Make sure to choose an appropriate data type to hold this information! | |||
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.
Since the information we want to store is a list of things (names of cats), we should use an array (with the square brackets []).
let nameAdult = ['Mezzo','Sabrina','Josie'];
let nameKitten = ['Kyle Meowry','Luna','Obi','Charlie','Raspberries'];| // Q-11: If I have a variable counter, and I want to increment it by 2, what are three ways I can do this? Add three console.log statements with the three different ways. | ||
| let counter = 0; | ||
| counter = counter + 1; | ||
| console.log(++counter); |
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.
Those are two ways to increment the variable, and the third way would be
counter +=2 // short way of writing counter = counter + 2;|
|
||
| console.log('I'm awesome'); | ||
|
|
||
| // The problem is in the wronge use of SINGLE QOUTE in I'm. To solve this problem we will have to replace the outer single qoutes to double quotes. |
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.
Yes, that's right!
|
|
||
| // ANSWER | ||
| let age; // declare variable | ||
| console.log('The value of age will be: twentyFive'); // Explain the value of age |
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.
The instructions might have been unclear - they were asking you to explain what you think the value of age is before you initialize it.
| const favoritesPlacesAndNumbers = ['India','17','Tajikistan','100']; | ||
| console.log(favoritesPlacesAndNumbers); | ||
| // Can you compare infinities? | ||
| console.log('could not answer this question?'); |
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.
after running the comparison on line 12, do you have an answer?
No description provided.