I'm just beginning with JavaScript and I would like some help on a loop I need to perform. I have read many code snippets and this still seems foreign to me, and I would appreciate some guidance.
An object (car) has five properties, one of which is an array. I need to loop through the object and print each of those values. What is a good, simple way to do this--either using a single loop or a nested one? I've tried using a counter and using that value as an index number for the properties and the array, but haven't been successful. Again, I'm very new to this and so I haven't been able to relate my example to those I've read.
var options = ["hard top", "power windows", "racing stripe", "fog
lights"];
var car = {color: "red", make:"Chevrolet", model:"Camaro",
year:"1967", options};
//I need a loop where with each iteration a property value of the
//car and an option is printed
document.write(SOMETHING);