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 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
229,708 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
229,708 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
229,708 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.