object oriented JavaScript test