Skip to content

Instantly share code, notes, and snippets.

@webxl
Created August 24, 2011 19:17
Show Gist options
  • Save webxl/1168925 to your computer and use it in GitHub Desktop.
Save webxl/1168925 to your computer and use it in GitHub Desktop.
logResult
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