Adding debug trick in JavaScript

I liked this trick….

    var aVal =‘debug=’)[1] ?‘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
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

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

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

Facebook photo

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

Connecting to %s