I have students working on the Unit 5 Hackathon Project and all of them are getting the same error, “setText() text parameter value (undefined) is not a uistring.” They are looking at examples from previous lessons and the formatting seems to be the same, so I believe their formatting is correct, but I’m not sure why all of them are getting the error. Please help a confused teacher!
Code.org - App Lab (students knows there are missing parts on lines 48-50)
Ask the students to use the Watchers or console.log to see the values in the arrays. The arrays have not been filled in because their code in lines 48-50 in either not complete or incorrect. If there are no values in the array, there is no text to set. Hence the error.
Is that the same issue on this one too, that the arrays have not been filled in? Code.org - App Lab
Yes, The end condition of the loop on line 47 is i < dogsTwice.length. Since dogsTwice is an empty array (dogsTwice.length is 0), the code inside the loop does not execute.
Thank you, I will have them try that!