Article
Using console.assert()
https://cdn.jsdelivr.net/npm/[email protected]/dist/js.cookie.min.js
Copy to clipboard
This method writes a message to the console, but only if a piece of code evaluates to false.
For example if we want to check if a div with id "password" exists in our page we do: https://raw.githubusercontent.com/finsweet/jqueryCourse/main/debugging/ex6.js?actionable=true
By pressing Ctrl + Shift + J on chrome you bring up a console window on your browser.
<script>
$(document).ready(function(){
XT1
});
</script>
$(document).ready(function(){
XT1
});
</script>
Copy to clipboard
Live demo
<script>
$(document).ready(function() {
XT1
});
</script>
$(document).ready(function() {
XT1
});
</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.