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.

Matt James
1,948 PointsMy Doc ready is not working? where in my code am i going wrong?
In my HTML file
<!DOCTYPE html>
<html lang="en">
<head>
<title>JavaScript Foundations: Functions</title>
<style>
body{
background: #EEE;
font-family: sans-serif;
}
</style>
</head>
<body>
<h1>JavaScript Foundations</h1>
<script src="functions.js"></script>
<button id="action">Action</button>
<input id="text_field">
</body>
</html>
in my functions.js file
function sayHello (){
console.log("Hello World!");
}
2 Answers

Dino Paškvan
Courses Plus Student 44,107 PointsIf 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.
someFunction();

Matt James
1,948 PointsThank you so much. Yes it's because I didn't evoke it.
Richard Duncan
5,568 PointsRichard Duncan
5,568 PointsHave you tried watching the video again? what is the actual question for the code challenge?