intresting example with classes in javascript