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!
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 trial
Jimmy Miller283 Points
I got this HW problem im having a tuff time getting my head around.
Heres what it says,
Create a new document in your text editor, and type the strict DTD <!DOCTYPE> declaration, <html> element, document head, and <body> element. Use “Largest Islands” as the content of the <title> element. Add the following <h1> element to the document body: <h1>Largest Islands</h1>
When it says in the script section, what does that mean and where are they asking to put it?
Next, add the following statements to the end of the script section that print the values stored in each of the variables you declared and initialized in the last step:
document.write(“<p>The largest island in the world is ” + island1Name + ” with ” + island1Size + ” miles. </p>”); document.write(“<p>The second island in the world is ” + island2Name + ” with ” + island2Size + ” miles. </p>”);
document.write(“<p>The third island in the world is ” + island3Name + ” with ” + island3Size + ” miles.</p>”);
document.write(“<p>The fourth island in the world is ” + island4Name + ” with ” + island4Size + ” miles.</p>”);
document.write("<p>The fifth island in the world is " + island5Name + " with " + island5Size + " miles. </p>");
Save the document as LargestIslands.html in the Exercises folder for Chapter 1 and then open it in your Web browser and examine how the elements are rendered. Close your Web browser window, but leave the LargestIslands.html document open in your text editor.
Thanks for the help guys!!!!!
Matthew Ong6,041 Points
When they say script section they are probably just referring to the section in between two script tags
Yay teamwork! :D