Source

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

var mallard = new MallardDuck();
var redhead = new RedheadDuck();
mallard.quack();
mallard.swim();
mallard.display();

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

Console

Try-Finally