- Create constructor functions
- Add methods to a constructor function
- Create objects from a constructor function
Scuber, in an effort to gain much needed local influence, has begun adding some powerful board members to its organization. It expects to add more (similar) board members in the future, so it needs you to declare a constructor function so that it can crank them out.
In index.js
, write a constructor function called BoardMember
that sets the
following properties: name
, homeState
, and training
.
Add following methods to the class:
veto
— returnsNo, I must disagree
approve
— returnsYou can do that!
doCharity
— returnsI like to help people.
releasePressStatement
— returnsYou will see great things from Scuber.
sayHi
— returns"Hi, my name is <name>. I am from <homestate>, and I was trained in <training>.