Fluffy has two friends, Grumpy and Lazy Bones.
1. Assign the value of Grumpy's 2nd activity to the grumpyActivity variable below.
2. Assign fluffy2ndFriend the name of Fluffy's 2nd friend.
var grumpyActivity = cat.catFriends.activities;
var fluffy2ndFriend = cat.catFriends;
I’m almost done with this one, but how would I for fluffly2ndFriend only access the name ‘Lazy Bones’ I’m failing due to it including his activities as well
I’ve edited your post for readability, because it was very hard to read.
You can use the “preformatted text” tool in the editor (
</> ) to add code.
In the future, please use the
Get Help button in a lesson to create a forum topic and fill in the questions.
Thanks for understanding!
You are currently in the second friend of the cat.
Now you have to use the property for the name, like you did in the first line for the
activities seems to be an array, a name isn’t, so you probably don’t have to use the brackets.