function exerciseTwo(animal){
// Exercise Two: In this exercise you will be given an object called ‘animal’
// Create a new variable called ‘animalName’
// Accessing the animal object, assign the ‘animalName’ variable to the ‘latinName’ key on the object.
// return the animalName variable.
const animalName = {};
animalName.latinName;
return animalName;
}
This is what I got from what u mention, something is still missing
const animalName = {};
animalName.latinName;
return animalName;
You… didn’t change anything.
-
Assign a value to the animalName
variable, not an {}
object.
-
Assign the animalName
variable to the latinName
key of the animal
object.
so I don’t have to make a new object?
Nope. The instructions say the animal
object was already defined.
1 Like
This is what I got now but still missing something, ugg im still a noob ig
const animalName
animalName.latinName;
return animalName;
You need to assign the animalName
value to the latinName
key of the animal
object.
Let’s review object-key notation. object[key] = value
.
Does that help?
LIke this?
const animalName;
animal[latinName] = animalName;
return animalName;
Yep. Now assign a value to const animalName
.
1 Like
thx man that helped a lot!
1 Like
Awesome! I’m glad I could help! Make sure you take some time to celebrate your success!
1 Like