How are you able to print all of the properties for objects in an array.
For example I have this array
const todo = [
{
text: "Water the plants",
completed: true
},
{
text: "Feed the dog",
completed: false
},
{
text: "Cook dinner",
completed: true
},
{
text: "Wash the dishes",
completed: false
},
{
text: "Clean the house",
completed: false
}
];
Am I able to print/access all of the text properties at the same time.
For example - if I use
console.log(todo.text)
I am given undefined? Are you not able to select all of these at the same time?