Javascript subclassing

Javascript subclassing pattern.