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 The Solution

Taylor Han
Taylor Han
3,701 Points

src link not in red?

Hello,

I cannot the first line:

var firstName = prompt(what is your first name?) ;

to pop up when I run the preview, and I don't want to keep building it if its already not working. I cannot figure out what is wrong, but my source variable in the html file is in blue and not red. Does that matter? I cannot get it to change and that is how it looks in the video so I'm thinking that the .js is not properly linked to the html, but cannot be sure.

Thanks in advance!

1 Answer

Hi Taylor,

The prompt method accepts a string as the first argument, to form one you add either single or double quotes around the text to display. Doing this informs the browser and syntax-highlighter that this is one pieces of data. Now the string should be displayed in the source in one color.

var firstName = prompt("what is your first name?") ;

Hope this helps;