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

while loop code

I have had a couple of codes not running including this one https://w.trhou.se/cei5jyfn9m is there anything wrong with it? thanks.

2 Answers

I was coding along with the teacher, this is one of the examples in the course, having a computer generate a random number and memorize it, then see after how many attempts it will guess the said random number. This has happened before too, have had some codes that produce nothing in the review while in the course it has worked, so I was kinda confused. in console it says it is an error 404

Steven Parker
Steven Parker
243,266 Points

The script code itself is OK in the file named "scripts.js" (plural).

But the HTML is trying to load a file named "script.js" (singular).