Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript

Julio Martin Hernandez
Julio Martin Hernandez
6,355 Points

Not a Function (Coding Your First HTML5 Game)

Hello!

I'm learning lime.js framework in the Coding Your First HTML5 Game lesson, and I'm in the part where I need to create a new object for Mike the Frog. Whenever I update the dependencies, it shows an error that the object cannot be found. So what I did is to manually create the frog object named "frog" using bin/lime.py create.

Next is an error of "Uncaught TypeError: object is not a function " in the line "this.frog = new frog();". I've already coded "goog.require('frog'):" and my javascript file already has the "frog = function(){ /codes here/ };"

Help is really appreciated. Thank you!

1 Answer

Julio Martin Hernandez
Julio Martin Hernandez
6,355 Points

I already made my code to work, and correct me if I'm wrong, I think it's only about the naming of the function.