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.
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”);
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.