Article

Using console.log()

https://cdn.jsdelivr.net/npm/[email protected]/dist/js.cookie.min.js
Copy to clipboard

A mistake in a program or a script is referred to as a bug. The process of finding and fixing bugs is called debugging.

To view any errors that might be in your script, browsers include an error console / JSconsole.

By pressing Ctrl + Shift + J on chrome you bring up a console window on your browser. If the window has no red text in it, then your code is likely bug free. Otherwise, an error message is shown with details of the type of error and location where it occurred. https://raw.githubusercontent.com/finsweet/jqueryCourse/main/debugging/ex1.js?actionable=true Will print a black hello world text message to your JS console.

<script>
$(document).ready(function(){
  XT1
});
</script>
Copy to clipboard
Send to Live Demo

Live demo

<script>    
$(document).ready(function() {
  XT1
});
</script>
<script>
  
</script>
Copy to clipboard
Press the Run Demo button to execute the scripts above.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Your browser is too small

Resize your browser to be at least 769px wide.