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 trialIfeanyi Gbemudu
2,054 PointsMy code always displays an extra div (grey circle) after the last number with no number in it though. Not sure why.
If I generate 10 divs from the code, I get 11 with the last div (grey circle) empty and misaligned vertically. Here's my code
var html = "";
for (var i = 1; i <= 10; i += 1) { html += "<div>" + i + "</div>"; }
document.write(html);
3 Answers
Steven Parker
231,269 PointsThis code simply makes 10 div
elements containing sequential numbers (1 - 10), all left-aligned. No circles or other graphic elements.
Is there some HTML and/or CSS and/or additional script that goes with this?
Joerg Strohbach
3,049 PointsSame problem here. Looking at the generated HTML code I figured out, that one of my installed browser extensions (Clip to Devonthink) created the last, empty circle.
Here is the line I found in the HTML source:
<div id="cliptodevonthink-is-installed"></div>
Steven Parker
231,269 PointsThat's a rather naughty browser extension!
I had not heard of "Devonthink" before, but perhaps this article I found on their website might help: When Chrome doesnβt like Clip to DEVONthink.
Jessica Foster
6,950 PointsI have the same problem. For me it's the Snagit extension I use for taking screenshots:
<div id="techsmith-snagitchrome-extension"></div>