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 trialmaya sophie
5,754 PointsMy solution...differences...good or bad?
I defined name,track,achievements and points first because looks more logical. Second, I used <br> instead <p>. Any difference?
P.S. I still did'n't get the point of having : ............................function print(message) { document.write(message);.....................when we use print(message) at the end......I just don't have it clear at all
2 Answers
Steven Parker
231,248 PointsWhile you can always override it with CSS, by default the <br> element only goes to a new line, but the <p> element provides padding and provides a "block" mode container for its content. The end results may look similar, depending on the context, but in other cases (particularly when additional CSS styling is used) the differences will be apparent.
And the code that begins with the word "function" is what defines what the "print" that is used later will do, and is necessary. to make it work.
maya sophie
5,754 Pointsthank you,Steven