<html><body>
<script>
//for-in loop (object)
document.write ("<div>");
const automobile = {make:"Volkswagen", model:"New Beetle", year:2009, color:"Sunflower Yellow"};
for (x in automobile)
document.write (x + " : " + automobile[x] + "<br>");
document.write ("</div><div style='margin-top:10px;color:red;'>");
//for-in loop (arrays)
const states = ["Arizona", "Florida", "Massachusetts", "Hawaii", "Maine", "New Jersey", "Michigan"];
for (x in states)
document.write (x + " : " + states[x] + "<br>");
document.write ("</div><div style='margin-top:10px;color:blue;'>");
var j = 1;
do {
document.write ("The number is " + j + "<br>");
++j;
}
while (j < 10);
document.write ("</div>");
</script>
</body></html>