Skip to content

Instantly share code, notes, and snippets.

@trevor-atlas
Created June 28, 2017 00:45
Show Gist options
  • Save trevor-atlas/6119d6dc16e854cbdb30a58c41123754 to your computer and use it in GitHub Desktop.
Save trevor-atlas/6119d6dc16e854cbdb30a58c41123754 to your computer and use it in GitHub Desktop.
An easier to use console.log
const tag = (tag, param) => {
console.log(tag, param);
return param;
};
const foobar = tag('foobar', tag('foo', 100 * tag('bar', 500)));
console.log('foobar is: ', foobar);
//>> bar 500
//>> foo 50000
//>> foobar 50000
//>> foobar is: 50000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment