Make sure that the first line starts with function and the last line is only a closing brace }.
function
}