sample of javascript