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 trial

JavaScript JavaScript Loops, Arrays and Objects Simplify Repetitive Tasks with Loops For Loops

Ali Sh
Ali Sh
2,026 Points

Why did we use the var html?

what is the use of the var html, why did we add it with the space and what the <driv> code stands for??

1 Answer

Steven Parker
Steven Parker
231,269 Points

The variable name "html" reflects the contents of the variable, since it is used to store HTML code. The name isn't important, you could get the same result naming it "bob".

And it's not "<driv>" but "<div>", which is an HTML tag that represents a division element. You might consider taking some HTML courses to supplement your JavaScript, such as HTML Basics.