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 and the DOM (Retiring) Responding to User Interaction Delaying Execution with setTimeout()

Console log not responding.

I have entered the same function shown in the video and yet nothing comes up into my console.

window.setTimeout((something) => {
  console.log(something);
}, 3000, 'Greetings, everyone!');

4 Answers

Steven Parker
Steven Parker
210,475 Points

On line 26 of "index.html" there is a hyphen instead of an equal sign, which prevents the script from loading:

    <script src-"temp.js"></script>  <!-- current line 26 -->
    <script src="temp.js"></script>  <!-- but it should be this -->

Awsome, thanks for catching that.

Steven Parker
Steven Parker
210,475 Points

Your code is correct. Could it be that scripts are disabled in your browser?

How do I enable my scripts in browser?

I do have scripts enabled. What else could this be?

Steven Parker
Steven Parker
210,475 Points

Are you using workspaces? If so, make a snapshot of your workspace and post the link to it here to facilitate a complete analysis.

https://w.trhou.se/iyxv4nuc57 ....here is my workspace link.