Source

import MallardDuck from '../../common/MallardDuck';
import RedheadDuck from '../../common/RedheadDuck';
import RubberDuck from '../../common/RubberDuck';

var mallard = new MallardDuck();
var redhead = new RedheadDuck();
var rubber = new RubberDuck();

mallard.quack();
mallard.swim();
mallard.fly();
mallard.display();

redhead.quack();
redhead.swim();
redhead.fly();
redhead.display();

rubber.quack();
rubber.swim();
rubber.fly();
rubber.display();
            

Console

Try-Finally