for (let i = 0; i < favs.length; i++) {
favs[i].listing =
Object.assign({}, favs[i].listing, {
favoriteId: favs[i].id,
})
}
for( ... of ...)
for (const fav of favs) {
fav.listing = Object.assign({}, fav.listing, {
favoriteId: fav.id,
})
}