Closed odv closed 4 years ago
let group = { title: "Our Group", students: ["John", "Pete", "Alice"], };
Name your method "showList" and format the output to be(use a forEach loop): Our Group: John Our Group: Pete Our Group: Alice
let group = { title: "Our Group", students: ["John", "Pete", "Alice"], showList() { this.students.forEach(( element) => console.log(`${this.title}: ${element}`)); } };
Name your method "showList" and format the output to be(use a forEach loop): Our Group: John Our Group: Pete Our Group: Alice