JavaScript JavaScript Basics Hello, JavaScript! JavaScript Practice Challenge

My workspace page won't connect to my JavaScript basics window tab.

I type in the JavaScript code exactly as instructed in the video. I refresh the page and nothing. Also my workspace page and JavaScript basics tabs are different from the video. I select the eye icon on the far right in the workspace window and it goes into a separate browser window the Javascript basics. Can someone assist me please?

3 Answers

Robert Manolis
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Robert Manolis
Treehouse Guest Teacher

HI Darius Johnson, thanks for the additional info. So on line 7 of the index.html file, you're linking a JavaScript file named javascript.js from a js folder. There's a couple problems with that. First, that JS file that you're linking is an empty file. There's nothing in it. On line 7, try changing that src attribute value from this, "js/javascript.js", to this, "js/preview.js".

And ideally, your JS should generally be added to the index.html file just before the closing </body> tag. So you can move that code from line 7 and place it between the code on lines 12 and 13.

Good-morning Robert! Thank you so much! It worked you're awesome! I truly appreciate it.

Robert Manolis
seal-mask
.a{fill-rule:evenodd;}techdegree
Robert Manolis
Treehouse Guest Teacher

Cool! Thanks, Darius Johnson. Happy to help. :smiley:

And if you're satisfied with the response you've received, feel free to mark as best answer and/or upvote. :thumbsup:

Robert Manolis
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Robert Manolis
Treehouse Guest Teacher

Hi Darius Johnson, hard to say what the problem might be or offer any suggestions without more information. Please share a link to the video or step you are working on. And share a snapshot of your workspaces, which you can do by clicking on the camera icon near the upper right of the workspace window. Then we can take a closer look at the situation and try to provide some helpful and actionable feedback. :thumbsup:

Hi Robert, I'm doing the "Add to JavaScript to HTML" video.. I'm trying to link the js file to the index.html file. Then have it display on the browser. I try to link the files and do the code exactly as asked and nothing. It won't display on the browser.. I did the snapshot and it came out blank https://w.trhou.se/s5q8mhirn4 https://w.trhou.se/1f3j04qwgk I hope this helps you understand my question better.