Unit 5 Lesson 12 Traversals Make

I have read previous posts and do not see this issue. I have 2 students with correct coding, but they have an error in the same place. I cannot figure out why this is.

**Link to the project or level:
1st Student: Code.org - App Lab

**2nd Student: Code.org - App Lab

1st Student:
Line 36: WARNING: Line: 36: setText() text parameter value (undefined) is not a uistring.ERROR: Line: 36: TypeError: Cannot read property ‘toString’ of undefined

2nd Student:
WARNING: Line: 30: setText() text parameter value (undefined) is not a uistring.ERROR: Line: 30: TypeError: Cannot read property ‘toString’ of undefined

What I’ve tried: I have gone through to check spelling and verified they actually pulled from the table. Copied/pasted their code into my Code.org to make some corrections, still the error.

The problem is that the first few lines of code where the lists are declared and populated have a [( and )] around the getColumn statements. Those extra braces must be removed. For example,

var cityList = [(getColumn(“Daily Weather”, “City”))];

must be

var cityList = getColumn(“Daily Weather”, “City”);

Do the same for all other lists.

1 Like

Ahhhh! Thank you, it was driving me crazy and I felt like I was missing a tiny detail.

Thank you again!

Can you please explain to me why the square brackets aren’t needed around the getColumn statements? I don’t know how to explain to my students why they aren’t needed, since this is creating a list.

1 Like

Thank you for the explanation! I sure appreciate the quick reply.

Thanks so much for the explanation. It finally makes sense!