ParseError thrown

syntax error, unexpected token "function"