JavaScript allows us to define getters and setters in the object literal syntax. Here's an example:
var date = {
year: '2017',
month: '02',
day: '27',
get date() {
// Get the date in YYYY-MM-DD format
return `${this.year}-${this.month}-${this.day}`
},
...