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

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.