Update sample.js

Inheritance demo