When developing web applications, I encounter the following error:
Uncaught SyntaxError: Unexpected end of input
The cause of this error can vary and I will share one of the 'stupid' error I made and the resolution.
The following line of code actually caused the error in my scenario:
<a href="#" class="ms-1" onclick="reply("comment_uxbohdkpue",1033,"Ray","ReplyToCommentId");">Reply</a>
To fix the error, we just need to change the double quotes in the function to single quote:
<a href="#" class="ms-1" onclick="reply('comment_uxbohdkpue',1033,'Ray','ReplyToCommentId');">Reply</a>