If I access the customer object in sendEmail function parameter I got these error.
$ node exercise.js
Customer { id: 1, name: \'John\', isGold: true, email: \'