8

Chrome Dev Tools throws the following JavaScript error:
Uncaught SyntaxError: Unexpected end of input ... application.js:1

application.js file (first two lines):

var firstTimeExecuting = true;   //should execute only once...above function call.
function guessAnal(guess) { ...  //Analyze the guess.     
2
  • Can you add the complete code? Commented Nov 27, 2013 at 4:45
  • 12
    that is quite the function name Commented Nov 27, 2013 at 4:51

1 Answer 1

12

Often times a line 1 error indicates that there is a major syntax error in the script somewhere that is preventing it from parsing correctly. Ignore the line number and carefully check your whole js script. If you're really having issues try breaking it into several js files, that way you can see which is failing (a syntax error in a js script causes that entire script to be ignored).

Sign up to request clarification or add additional context in comments.

1 Comment

Also try a js validator -- jslint.com, jshint.com There are many offline tools as well. This can be faster than manual debugging.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.