finish javascript