displayListByName(): string[] { // map - 기존 배열을 변환해서 새로운 배열을 만든다. // 아래 코드는 contact 배열의 name으로만 새로운 배열을 만든 코드다 return this.contacts.map(contact => contact.name); } displayListByAddress(): string[] { return this.contacts.map(contact => contact.address); } let heroes = [ { name: 'Tony', age: 30 }, { name: 'Captain', age: 100 }, ]; heroes.map(function (hero) { return hero.name; }); 예) herose 배열에서 n..