This is my object:
var students = [
{
name: "Pavel Ravel",
track: "CSS, HTML5, jQUery",
achievements: "145",
points: "353"
},
{
name: "Steve Jobs",
track: "MacOS, iOS",
achievements: "3958735",
points: "09854"
},
{
name: "Bill Gates",
track: "Windows",
achievements: "358798",
points: "37593"
},
{
name: "Gabe Newel",
track: "Steam",
achievements: "5302",
points: "3052"
},
{
name: "Steve Wozniak",
track: "Apple 1 and 2",
achievements: "23562",
points: "3525632"
}
];
What should I do for document.write variable students? I have created a for in loop but it wirtes only undefined
for ( var studentsList in students ) {
document.write(studentsList[students]);
}
The goal is to write this into the document:
name: "Pavel Ravel", track: "CSS, HTML5, jQUery", achievements: "145", points: "353"