× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

Use the browser console when developing Javascript

Aaron Overton
Jan 20, 2016
<p>The browser console is your friend when it comes to debugging your Javascript!</p> <p>If you've never done that before, it'll be like magic. Open your page in your browser (I happen to prefer Chrome,) and right click on the page. Some version of "Inspect" should be on the context menu. Select that.</p> <p>You will get a console which has output, including stuff like all your 404 warnings that I'm sure you've never had. :)</p> <p>Two great ways to use this:</p> <p>In your Javascript code, use: console.log("blah")</p> <p>That will output the word "blah" to the console. You can put anything in there, include stuff like objects, to see what's going in your application.</p> <p>You can also type commands directly into the console and see the results. Try typing jQuery commands to see the output.</p> <p> </p>
comments powered by Disqus