In this lab, you will be doing your first “refactoring”, which the process of migrating working code into a new methodology or tech stack. Today, you’ll migrate a standard constructor function exported from a node module into a Class, keeping the functionality (and the interface) exactly the same.
Fork the Online REPL for this assignment. Complete your work in the online editor
Car
and Motorcycle
as Vehicles using only Javascript ES6 Class{}
syntaxWhen running this REPL, you will see that there is some output that will show you that a Car and Motorcycle can be created properly using a Constructor Function and Prototype methods.
However, the Vehicles via ES6 Classes will cause errors, as it has not yet been implemented.
Your work will be done in the vehicles-with-classes.js
file, which is setup to run the same methods on Car and Motorcycle classes as the “Constructor” version, with the expectation that you can produce identical output
Submit a link to your completed REPL