Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 1.32 KB

File metadata and controls

28 lines (22 loc) · 1.32 KB

Cloning and Pushing to Your Own Repository

  1. Fork this repository by clicking the "Fork" button in the top right corner of this page. This will create a copy of this repository in your GitHub account.
  2. Clone your forked repository to your local machine using the following command in your terminal:
    • git clone https://github.com/your-username/javascript-oop-assignment.git
    • Replace your-username with your GitHub username.
  3. Make changes to the files in your local repository as directed in the exercises.
  4. After making changes, add, commit and push your changes to your remote repository using the following commands in your terminal:
git add .
git commit -m "Add changes as directed in the exercises"
git push origin main

Replace main with the name of the branch you want

ABC Car Lot Assignment using Javascript Classes

Write a Car class in Javascript that takes the following properties as parameters and sets them in a constructor:

  1. Make
  2. Model
  3. Year
  4. Color

Finally, make sure to add 4 methods (getMake, getModel, getYear, and getColor) that return the car's respective properties

(This is called a 'getter' in Object Oriented Programming)

If you're stuck, take a look at the example class here for reference: https://www.geeksforgeeks.org/introduction-object-oriented-programming-javascript/#