Solve the problem of Uncaught SyntaxError: Unexpected token var error

There is no problem with the code during development, and no error is reported, but after putting it on the server, the error Uncaught SyntaxError: Unexpected token var appears. It is a bit of a headache to see this error, and there is no specific solution on the Internet, so I can only bite the bullet. I made a mistake. I looked at my code carefully, and there was no problem with the logic at all, and the bracket closure was complete, but it was an error. Later, by chance, I found the problem. code above

It turns out that every method on the server needs to be separated by a semicolon, and some methods were not separated by a semicolon during development, which led to the problem, and I cried in the toilet.

Tell everyone to develop good development habits, close when it is time to close, don't omit the place to write, share it with everyone, and don't make similar mistakes.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325914059&siteId=291194637