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 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;