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 JavaScript Foundations Functions Arguments

My Doc ready is not working? where in my code am i going wrong?

In my HTML file

<!DOCTYPE html>
<html lang="en">

<title>JavaScript Foundations: Functions</title>

        background: #EEE;
        font-family: sans-serif;


<h1>JavaScript Foundations</h1>
<script src="functions.js"></script>
<button id="action">Action</button>
<input id="text_field">


in my functions.js file

function sayHello (){
    console.log("Hello World!");
Richard Duncan
Richard Duncan
5,568 Points

Have you tried watching the video again? what is the actual question for the code challenge?

2 Answers

If that's all you have in your functions.js file, you have a single function which isn't being called anywhere so the code isn't really going to do anything on its own.

Re-watch the video again, and you'll see that Jim invokes the function to get some output.


Thank you so much. Yes it's because I didn't evoke it.