All modern browsers will prompt you when your scripts are not correct. The problem is, sometimes, these messages are not necessarily the most accurate or correct. For that reason we create debug messages at certain key points in our code that can be returned. This way we can easily identify what part of our code has executed, and where we are getting stuck.
JavaScript makes a few methods available to us, some more helpful than the others in certain situations, to insert our own custom debug messages.
One option we have seen before in some of the scripts we worked on already is using an alert. This brings up a pop-up message for the user. This approach, while easy to follow, is quite disruptive if we are testing a longer script, as ...
No credit card required