Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Terry Cone
47 PointsVM527:1 Uncaught ReferenceError: countBirds is not defined
I get the "VM527:1 Uncaught ReferenceError: countBirds is not defined" message in the Chrome console when I enter: countBirds()
Any thoughts on this? Terry

Terry Cone
47 Pointsthank you. However, I am using a workspace from the video "The Problem with Globals" the function is defined as such: var count = 0;
function countBirds() { count += 1; return count + ' birds'; }

Jesus Mendoza
23,289 PointsYeah, check if you spelled it properly
3 Answers

Joel Kraft
Treehouse Guest TeacherTerry, I was able to replicate the issue you describe. It didn't happen every time, but when it did, I simply refreshed the browser and it worked as expected. I'll raise an issue to look further in to this. In the meantime, I hope this helps!

Terry Cone
47 PointsThank you, and yes I just needed to refresh...

Andrew Chalkley
Treehouse Guest TeacherHi Terry Cone
I launched the workspace associated with the video and was able to get:
Maybe delete the workspace from the /workspaces dashboard and try again!
Regards,
Andrew

Terry Cone
47 PointsHi there. If I paste the code into the index.html page I can successfully call the function. Otherwise, the linked script gets me a uncaught error. It works for you, so possibly it is a setting I have in Chrome - at any rate, thank you for looking into this for me. I am a trial user and will not be continuing but thank you again. Terry
Jesus Mendoza
23,289 PointsJesus Mendoza
23,289 PointsThat means there is no function called countBirds() defined