А ну смотри есть
Class Adress{
constructor(ip) {
this.ip=ip
this.re="re"}
getInfo() {return "${
this.re} ${this.ip}"}
}
class Manages{
constructor() {
this.adresses=[]
}
setAddress(adress) {
this.adresess.push(address)}
getAdresesses(){
return
this.adresses.map(_transform)
}
}
function _transform(obj) {
return obj.getInfo()}
const manager=new Maneger()
const adreses=[1234, 123]
adresses.forEach(adress=>manager.setAddress(address))
console.log(manager.getAddresses())