In javascript we do not have classes. We have objects. There's is only one way to make inheritance in javascript. That is by chaining prototype.
in the following example I have defined Person and Student objects where Student object inherit form the Person object.
No comments:
Post a Comment