const event = {
    name: 'Birthday Party',
    guestList: ['Andrew', 'Jen', 'Mike'],
    printGuestList() {
        console.log('Guest list for ' + this.name)

        this.guestList.forEach((guest)=> {
            console.log(guest + 'is attending ' + this.name)
        })
    }
}

event.printGuestList()


Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: