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.


function challenge not working

I'm on the last section of JavaScript Basics, and the second task of the first challenge in the functions section keeps giving me an error message that the first task is not passing. Any suggestions on what is wrong with this code?

function sayHi(){ alert (sayHi); }

1 Answer

Steven Parker
Steven Parker
220,378 Points

What course, and what challenge (name them or provide a link)?

But I'm guessing at the very least, the content of the alert needs to be quoted:

function sayHi(){ alert ("sayHi"); }

Yup, that was the ticket - thanks! I'm currently on a public computer that uses IE and won't let me get to Chrome, so the link to the course won't work today. It's JavaScript Basics, creating a function challenge.