Check Your JavaScript Errors in Chrome Browser Easily

How to check Javascript Errors in Chrome

We can create an attractive front-end website using only HTML and CSS but we need JavaScript to create some back-end functions. JavaScript keywords like “getElementById”, “innerHTML” are mixed with lowercase and uppercase letters and it may be prone to more errors. In this article, I am going to tell you how to find or check those javascript errors in the chrome browser.

How to find JS errors

var player = false;
document.write("Type of Is Game", players);

In the above code, we have a “player” variable, but we trying to print the “players” variable. Only the player variable is here, there is no player variable. It is an error because we print without initializing the variable. Since we have written only two lines of code here, we can find it easily, if there are many lines of code, we will not be able to find it.

1. To find the error first, we go to the output page of the browser.
2. Right-click on it, and select “inspect” as in the below image.

how to check javascript errors in chrome
3. Then choose the “console” option as in the below image. See your JavaScript errors with error lines.


how to check javascript errors in chrome

Leave a Reply