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 Basics Working with Strings Display the Value of a String on a Page

Alexandra Velez
seal-mask
.a{fill-rule:evenodd;}techdegree
Alexandra Velez
Front End Web Development Techdegree Student 9,313 Points

Why does Chrome Dev tools give a 404 message for shout.js lesson?

Screenshot: https://snipboard.io/AUNztc.jpg

It does produce the prompt. When I answer the prompt, it doesn't reveal the answer in the console.

The only error message is along the lines of 404, not found.

Why does this error message display?

4 Answers

Steven Parker
Steven Parker
231,275 Points

The error seems to come from some non-standard browser extension and does not seem related to the code.

But in the code I see the first line defines "StringToShout" (with 3 capital letters), but then the second line attempt to access "stringtoShout" (with just one capital) instead.

In future, a better way to share code to get help is to make a snapshot (not "screenshot") of your workspace and post the link to it here.

Alexandra Velez
seal-mask
.a{fill-rule:evenodd;}techdegree
Alexandra Velez
Front End Web Development Techdegree Student 9,313 Points

Is there a way to identify which browser extension is causing the error message? I'd like to remove it.

Good observation! I didn't see notice the lack of capital letters.

Thank you for including the link to how to do a snapshot. I'll definitely use that in the future to share the code in the workspace.

Steven Parker
Steven Parker
231,275 Points

About that extension .. see if you have anything loaded that resembles that long word (or part of it) in the error message.

got the same error message. i thought i was bugging wondering why it works well for him and not for me. I typed it in chrome using the console for js. and my error said "uncaught SyntaxError: Identifier 'stringToShout' has already been declared. "

const stringToShout = prompt("what do you want to shout"); let shout = stringToShout.toUpperCase(); const shoutMessage = <h2>The message to shout is: ${shout}!!</h2>;

document.querySelector('main').innerHTML = shoutMessage; VM572:1 Uncaught SyntaxError: Identifier 'stringToShout' has already been declared

i had the same issue. i got the 404 message issue, and also Identifier 'stringToShout' has already been declared. ".

i did copy the code to the console of Firefox and it worked perfectly

const sTS = prompt ("what would you like to shout?"); const shout =sTS.toUpperCase();

const sM =the message to shout is: "${shout}!";

document.write(sM);