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
173,537 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.