Use the console

If your code isn’t doing what you expect, there might be an error somewhere. A quick way to check is to look in the console. Open your browser’s Developer Tools and select the Console tab.

If there’s an error, the console tells you:

Like this: