Question from the Javascript - Fundamentals test

Print the name and age of each professor in an array.

Easy

What does the following code display?

const professors = [ 
    { name: "Ritchie", age: 70, },
    {name: "Eich", age: 60,}];
for (let professor of professors) { 
    console.log("Here is your teacher " + professor.name +" "+ professor.age+" " + "years old");
 }
Author: CapucineStatus: Published(Update)Question passed 618 times
Edit
3
Community EvaluationsNo one has reviewed this question yet, be the first!