Skip to content

Conversation

@aalitenaye
Copy link

No description provided.

Copy link
Collaborator

@epq epq left a 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!
Copy link
Collaborator

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);
Copy link
Collaborator

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.
Copy link
Collaborator

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
Copy link
Collaborator

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?');
Copy link
Collaborator

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?

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