Bike

Objective/s:
  • To create a function that implements the prototype property
  • To broaden knowledge in using ES5, ES5 with prototype property and ES6

Create a new class/function called Bike with the following properties/attributes:

  • price
  • max_speed
  • miles

Create 3 instances of this bike.

Now add a constructor method to the class (if using ES6) and require the user to specify the price and max_speed of each instance. In the constructor also specify in the code so that the initial miles is set to be 0 whenever a new instance is created.

Add the following functions for this class:

  • displayInfo() - have this method display the bike's price, maximum speed, a...
Please submit your assignment before moving to the next lesson. chevron_left Prev Nextchevron_right