// How to declare and use functions with the class keyword
class Person {
constructor(firstName, lastName) {
this.firstName = firstName
this.lastName = lastName
}
sitOnCouch(doBillsGottaBePaid) {
if (doBillsGottaBePaid === 'yes') {
return 'I must work'
} else {
return 'I will sit on the couch'
}
}
}
const manny = new Person('Manny', 'Hagman')
manny.sitOnCouch('no')