跳转至

Coding Challenge #4#

Your tasks#

  1. Re-create Challenge #3, but this time using ES6 classes: create an 'EVCl' child class of the 'CarCl' class
  2. Make the 'charge' property private
  3. Implement the ability to chain the 'accelerate' and 'chargeBattery' methods of this class, and also update the 'brake' method in the 'CarCl' class. Then experiment with chaining!

Test data#

  • Data car 1: 'Rivian' going at 120 km/h, with a charge of 23%

GOOD LUCK 😀


1

评论