segment of javascript