Benedict
Well-Known Forumite
const people = [
{name: "Don", age: 35, job: "dentist"},
{name: "Amy", age: 55, job: "doctor"},
{name: "Bruce", age: 26, job: "nurse"}
]
const overthirty = people.filter(person => {
return person.age >= 30;
});
document.write(overthirty),
This gives me ['object,Oject, 'object,Object']. how do I get the array content to screen not 'object?
This may look a bit naive but I am 77 and learning JS
document.write(overthirty);
{name: "Don", age: 35, job: "dentist"},
{name: "Amy", age: 55, job: "doctor"},
{name: "Bruce", age: 26, job: "nurse"}
]
const overthirty = people.filter(person => {
return person.age >= 30;
});
document.write(overthirty),
This gives me ['object,Oject, 'object,Object']. how do I get the array content to screen not 'object?
This may look a bit naive but I am 77 and learning JS
document.write(overthirty);