Omar Al-Bazergan
Omar Al-Bazergan

Reputation: 11

Uncaught SyntaxError: Unexpected end of input

Im making a simple java script game and when I load up my html file to google chrome I get a "uncaught syntexerror: unexpected end of input" and it says the error code is on line 143 This is the function that is on line 143 "

function colorText(showWords, textX,textY, fillColor) {       
    canvasContext.fillStyle = fillColor;     
    canvasContext.fillText(showWords, textX,textY); 
}

Upvotes: 1

Views: 2167

Answers (1)

Blindman67
Blindman67

Reputation: 54079

You must look else where. This error is the result of a missing or extra { or } that is above the line the error occurred.

Upvotes: 1

Related Questions