Pack Your Bag explainer


The aim of this puzzle: To create a variable called myBackpack and assign it an object {} to hold. Inside the object there should be three properties: food (with the value 'bananas'), equipment (with the value 'map') and clothing (with the value 'hat'). The final step is to print out the value held by the food property inside the myBackpack object.

Review concepts: The achievements ‘Created a Variable’ and ‘Accessed a Property’s Value’ unlock the ability to complete this puzzle.

Review puzzles: Try taking another a look at the puzzles ‘This is Your Year’ (variable creation), ‘Custom Colors’ and ‘Make a Name for Yourself’ to get an idea of how to create an object, add properties (and property values) to an object and then print out a property’s value using print().

Sample code solution:
Since this is part of the final topic of the fundamentals course and it is testing your knowledge, there is no sample solution code.

JavaScript Concepts: Object Expressions, Member Expressions, Calling Functions
Grasshopper Concepts: print()

Pack your backpacks
Backpack newbie issue
I'm having trouble with the pack your bags puzzle

I have no idea why I cannot move forward. It appears to me that I have achieved the goal of the lesson but nothing happens. The program does not move forward. I have signed out and back in. I rerun the code and get the correct results again. After the correct results are display in the results box nothing happens?

Backpack newbie issue

I am having the same issue.


Hi @TomLarryJr,

Could you share a screenshot of your code so I can have a look? I might be able to spot if there is an issue on our side, or a small element in your code that needs to be changed.

Heather :slight_smile:


Hi @MaxH,

Same question! Could you share a screenshot of your code so I can have a look and hopefully figure out what’s blocking you?

Heather :slight_smile:


I got help on. The peoblem was that i made an extra variable for Mybackpack.


Great to hear you got help and were able to solve this puzzle!


Hello. I cannot figure this one out. Please help. The instructions and other notes aren’t enough i am missing something critical here.


Hey @Robert_Hise,

This is a tricky puzzle! The aim is to create a ‘backpack’ which is an object. You may want to look at the lesson ‘Make a Name for Yourself’ to refresh your memory on how objects are structured.

The object should be stored in a variable called myBackpack, and have three properties: food, equipment and clothing. Each of the properties should hold 'bananas', 'map' and 'hat' respectively.

Once the object is created, the food property should be printed out using print(

If you’re still having trouble, I’d be more than happy to look at a screenshot of your code and see if I can spot where the issue is.

H :slight_smile:


I figured it out right after I messaged you. I guess I needed to take a break and come back to it. I appreciate the help.


Sweet! Glad you were able to figure it out :slight_smile:


Having trouble here. I know it needs to say print(, but the code editor won’t let me do that. As soon as I hit myBackpack, it closes the brackets and there’s no way to manually edit it. So I’m stuck.



Are you able to tap on myBackpack inside print(myBackpack) then tap on the .food key? You may have to scroll your keyboard to the right to see the .food key.

Let me know if this doesn’t work!
H :slight_smile:


Yes, that worked. Did you change something? I tried everything for 10 mins before, without success.
Thanks anyway… moving on…


Finally I completed this puzzle after trying to figure out the right codes for half an hour very nice puzzle


Whats the problem here


Can you help?




I’m stuck too. I reviewed Making a Name for Yourself, and I just don’t know what I did wrong. I’m sad and frustrated.


This is the code that got me past this one