Javascript ADT