Pack Your Bag explainer


Hey there! Try checking the spelling of equipment in the myBackpack object.



My question is aboit. Pack your backback.

I have tried this with just bananas
I’ve printed out bananas, hat and map.
Every way I 've tried is incorrect.
What am I doing wrong?


Your code should work if you remove the 1st line of code: var myBackpack = myBackpack;.



It worked, Thank you! But, it says to create a variable myBackpack.
That was the line I removed.
I would of never guessed. Do you know why it says to create a variable
But the end result to get correct, you don’t use that code.


There could be a mistake in the feedback – I’ll have to check.

In this puzzle, you do have to create a myBackpack variable using var myBackpack = ..., but the code you posted has that written twice. Once a variable is created, it doesn’t need to be created again. If you want to change an existing variable’s value, you just use myBackpack = ... without var or let.

let is a different kind of variable taught in Fundamentals II. Sometimes you can have multiple let myVariable = ... in your code. This is because each let only exists inside its own code block {}. So you can actually have different variables with the same name because they’re “trapped” in their own part of the code.



I’ve used this code so many times and it’s still not letting me get past, I don’t underatand.


If you share a screenshot of your code, I could take a look.



See the thing that pisses me off about this puzzle is why is it that when i declare a variable it immidetly prompts me to add value to it. Why cant i leave it with no value ??.???


I can’t find out why my script is wrong.

var myBackpack = {
food : bananas
equipmemt : map
clothing : hat


It looks like you have a few typos when typing out your code here. Make sure you spell everything exactly how it appears in the instructions.



hey Momo this is the exact code i have right now but it wont work can you help me


I have the same as @Momo but it’s still not working :frowning:


Oh!!! I had myBackpack with a capital P
Tricky :wink:


Can any one tell me why I can’t pass this?


Nevermind haha capital p


I‘m stuck I think that my code for this lesson id right and it‘s work too but I can‘t make the next lesson
I Hope you understand my Problem and can help me



whats wrong in this code?


Oh ok I see now I had equiptment instead of equipment. Lol.:hugs:


Why did it Not work ? Can you help ?


I’m having trouble with this code and I need help. I think I got it right it’s just not working.Screenshot_20190121-225140_Grasshopper please tell me where I’m wrong in this puzzle