Jonkavaliauskas / prototypal-oo-js-object-oriented-object-methods-lab-yale-web-yss-052520

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Object Methods in JS Lab

Objectives

  • Create constructor functions
  • Add methods to a constructor function
  • Create objects from a constructor function

Instructions

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 — returns No, I must disagree

  • approve — returns You can do that!

  • doCharity — returns I like to help people.

  • releasePressStatement — returns You will see great things from Scuber.

  • sayHi — returns "Hi, my name is <name>. I am from <homestate>, and I was trained in <training>.

View Object Methods Lab on Learn.co and start learning to code for free.

About

License:Other


Languages

Language:JavaScript 74.7%Language:HTML 25.3%