Skip to content

Instantly share code, notes, and snippets.

Created Jan 18, 2019
What would you like to do?
basic logging to document
function log(...args) {
// console.log.apply(console, args);
args = =>
typeof arg === 'object' ? JSON.stringify(arg) : arg
const preEl = document.createElement('pre');
const codeEl = document.createElement('code');
codeEl.appendChild(document.createTextNode(args.join(' ')));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment