Pack Your Bag explainer


#102

Hello again,

I apologize for reporting a technical issue that does not exist: yes, I used the autofill, but my keyboard detects English AND French. I tapped on the French word instead of the English word, which is spelled slightly different.

Have a great learning, mates!


#103

This is not helping mate. I still can’t figure it out.


#104


I need help


#105

Try changing clothes to clothing. The puzzle is looking for an exact spelling.

–Frankie


#106

Ok thank you that worked.


#107

Stuck here ,need help


#108

I can’t see all of your code, but there is a small typo in your equipment property. The ‘m’ and ‘p’ are in the wrong order.

–Frankie


#109

Thank you it’s work:grinning:


#110


#111

Hi there friends,
I’ve been using the Grasshopper app to learn some Java and I think it’s a great tool!
I have reached the the level of Backpack with much enthusiasm but, I am now really stuck!
I created the variable and thought I followed instructions, however, no matter what I try to solve the problem it gives me the following messages :
Cannot read property ‘food’ of undefined.
This tells me I have not defined that property? I have really searched around to see how I can go past this, and as far as I can see I have defined properties correctly:
var myannoyingBackpack ={
food: ‘potatoes’
etc
Etc
print (myannoyingBackpack. food)
}
I have tried other combinations as well but the app doesn’t let me define in other ways. Perhaps I’m doing it wrong and while I understand you can’t give me the answer, a hint would be great
It would be a shame if I just gave up, perhaps I’m not a coding person!
Thanks


#112

Hey @Java,

Could you share a screenshot of your code? Looks like your structure is correct so I’m thinking it’s probably a capitalization or slight word variation causing issues.

You might also find the responses on Pack Your Bag explainer useful.

Thanks,
Heather


#113

Hello Heather,
Thanks for taking the time to reply. This has been driving me nuts for the last 10 days at least. To the point if giving up on the whole thing. From what I can see from other examples here, my code is correct. Please have a look at the screen shot and see if I’m being ‘blind’ :sunglasses:

Thanks again


#114

Hi @Java,

You’ve put the print() function into the value of an unnamed object property. Try removing that and instead putting the print() function outside of the object, something like:

var myObject = {
example: 'this'
}
print(myObject.example)

Hopefully this helps!
:slight_smile:


#115

Hi there,
Well this was it! Thank you I would never have seen this…! :sunglasses::grimacing:


#116

Hi @Java,

I’m not sure if it will help or not, but if you tap the semicolon, the entire item will highlight. showing you what is included and what isn’t. In this case, you would see that the print() is inside the var.

@Grasshopper_Heather, you probably should add semicolons to your reply.

–Scott.


#117

I am not able to make it to the next level. Pls help me out


#118

Is it the level where you have to create the variable myBackpack?

If it is… Then you have seen in the previous lessons you can create a variable holding an object with multiple properties and values…

Like so:

var myColors = {

color1 : ‘Blue’,
color2 : ‘Red’,
color3 : ‘Green’
};

Hope this helps

Happy coding!


#119


#120

Your print() is using a string instead of the .food property of the myBackpack object. Try deleting the orange string, or the entire print() and then using the myBackpack button and the .food button instead of spelling them out.

–Frankie


#121


I need help it won’t let me go on