task of javascript