Skip to content

abdulrhmany/class_challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to Week 8 JS Challenge Code

Create a Vehicle class which has 3 properties: color, number of wheels and horn. The color defaults to "blue", the default value of number of wheels is 4 and the horn defaults to "beep beep".

Add a method honkHorn() which prints the value of the horn of the vehicle.

Then create a Bicycle subclass that extends the Vehicle class. The Bicycle subclass should override Vehicle's constructor function by changing the default values for wheels from 4 to 2 and horn from 'beep beep' to 'honk honk'.

Bonus (optional): Make each class in a separate module and use them together in a different module (main.js)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors