Adding debug trick in JavaScript

I liked this trick….
  

</div>
    var aVal = location.search.split(‘debug=’)[1] ? location.search.split(‘debug=’)[1] : ‘0’;
    if (aVal == “1”) {
        document.getElementById(‘debug-area‘).style.display = “block”;
    } else {
        document.getElementById(‘debug-area’).style.display = “none”;
    }

About Pankaj

I am a Developer and my linked profile is https://www.linkedin.com/in/pankajsurti/
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s