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 trialJohn Guiney
3,913 PointsI followed the video and code exactly and the circles are still not showing
Below you can find my code for the index.html and scripts.js files.
For some reason I still do not get anything displayed on the preview page.
index.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Circles</title> <link rel="stylesheet" href="css/styles.css"> </head> <body id="color"> <script scr= "js/script.js" ></script> </body> </html>
scripts.js
var html = '';
for (var i = 1; i <= 10; i += 1) { html += '<div>' + i + '</div>'; } document.write(html);
Thank you for help. John
3 Answers
Adam Beer
11,314 PointsInside your HTML page. Correct your
<script scr= "js/script.js" ></script>
to
<script src= "js/script.js" ></script>
Hope this help!
Tsenko Aleksiev
3,819 Points@Adam Beer you were faster :) GG!
Adam Beer
11,314 PointsToo simple, though, I was thinking a lot about it. :D The point is, we found it :)
Tsenko Aleksiev
3,819 PointsIs this your code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Circles</title>
<link rel="stylesheet" href="css/styles.css">
</head>
<body id="color">
<script scr= "js/script.js" ></script>
</body>
</html>
JS
var html = '';
for (var i = 1; i <= 10; i += 1) {
html += '<div>' + i + '</div>';
}
document.write(html);
It should print the numbers from 1 to 10 right? Look at your script tag: the SRC is misstyped, you have writen SCR :)
John Guiney
3,913 PointsThanks guys, yeah I scrubbed it and just couldn't find it.
Adam Beer
11,314 PointsAdam Beer
11,314 PointsPlease rewrite your code section and use 3 backticks (```) on the line before and after.
Code
Wrap your code with 3 backticks (```) on the line before and after. If you specify the language after the first set of backticks, that'll help us with syntax highlighting.