Hi,

I tried to use Inheritance concept of OOP in Aris script and it did not work for me. Are there other ways to do this:

function Animal(name){ this.name = name;}

Cat.prototype = new Animal();

Cat.prototype.constructor = Cat;

function Cat(name){this.name = name;}

var cat1 = new Cat("cat1");

And what is the surprise: the cat1 is the instance of the Animal and NOT the Cat.

Some suggestions?

Thanks a lot.

 or register to reply.

Notify Moderator