Help with Debugging Project Hackathon

**One of my students is struggling with some debugging issue and is looking for some help. Any tips you have are greatly appreciated *

Link to the project or level: App Code
What I expect to happen: The app is supposed to provide the user with a Perfect Bob Ross episode to watch based on if they would like to watch an episode with buildings in it and what kind of tree they want to paint as well.
What actually happens: When we run the app, after we select our drop down options and hit next, the text area down below reads “undefined”
What I’ve tried: We have tried various debugging strategies including deleting/adding parenthesis, brackets, semi colons, etc. Please let me know if you have any other suggestions.

I see a couple of issues. Firstly, remove all “[” and “]” around the getColumn statements. The getColumn method returns a list, you do not need to put that list in another set of square brackets. For example, this is what line 1 should be

var idList = getColumn("Artistic Works of Bob Ross", "id");

Next on lines 28-36, coneList and fepisodes have different sizes, so you may be referencing elments in fepisodes that don’t exist. You may want to double check the logic in that loop.

3 Likes

Thank you so much. It is now working properly!