During the development, there was no problem with the code, and no error was reported. However, after putting it on the server, there was an unexpected syntax error: unexpected token var. it was a bit of a headache to see this error. There was no specific solution on the Internet, so I had to find the error. I looked at my code carefully, and there was no problem with the logic, The closing of brackets is also complete, but it is an error. Later, by chance, we found the problem. Upper code
It turns out that every method on the server needs to be separated by semicolon, but some methods didn’t use semicolon when they were developed, which led to the problem of crying in the toilet
Tell you to develop good development habits, close when it’s time to close, don’t omit what should be written, share with you, don’t make similar mistakes