Created
August 24, 2011 19:17
-
-
Save webxl/1168925 to your computer and use it in GitHub Desktop.
logResult
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function logResult(result) { | |
var container = document.createElement('PRE'); | |
document.body.appendChild(document.createElement('HR')); | |
document.body.appendChild(container); | |
container.setAttribute('class', 'logResult'); | |
container.innerHTML = typeof result + ': ' + result; | |
} | |
/* | |
logResult(234); | |
logResult(logResult); | |
logResult("test"); | |
logResult(); | |
logResult({}); | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment