Introduction to JavaScript

Developer tools

Learning a new language is rarely done without making a few mistakes along the way. Lucky for us, most modern web browsers have extremely helpful developer tools that can help us identify the exact error.

We can hit F12 to open up our developer tools. When working with JavaScript the console tab is where we want to be. Any errors in our code or our own debugging prints will appear here.

Debug prints

We can print any valid JavaScript value to the console by using the log or error methods that the console object provides.

console.log("I get printed to your console tab")

Try clicking the button below and confirm that you see the same text as what is on the button in your console tab.