Create a gist now

Instantly share code, notes, and snippets.

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