Do Bills Gotta Be Paid

node v6.17.1
version: master
endpointsharetweet
// 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')
Loading…

no comments

    sign in to comment