Link to home
Start Free TrialLog in
Avatar of Isaac
IsaacFlag for United States of America

asked on

JavaScript Implement Inheritance

I am trying to implement inheritance but it does not seem to work.  I am following the example in "Programming in HTML5 with JavaScript  and CSS3".  I created a vehicle constructor and then created a car that is supposed to inherit from vehicle but I'm getting an error.  See below in jsfidle.

http://jsfiddle.net/isogunro/nj9x5zbn/1/

Any ideas?
Avatar of Isaac
Isaac
Flag of United States of America image

ASKER

When I run jshint, it says "Car" is already defined but in the book, they have it executing with no errors.
SOLUTION
Avatar of Alexandre Simões
Alexandre Simões
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial