Last active
August 29, 2015 14:13
-
-
Save dealingwith/cb125ff7cc091ea9facb to your computer and use it in GitHub Desktop.
I think this is ugly, but it's the most readable way I can figure to write this. Suggestions?
This file contains hidden or 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
setTimeout -> | |
analytics.track 'Time on Site', | |
category: 'site', | |
label: 'seconds', | |
value: 60 | |
, 60000 |
BTW, the resulting JS:
setTimeout(function() {
return analytics.track('Time on Site', {
category: 'site',
label: 'seconds',
value: 60
});
}, 60000);
To me, that's totally readable. Maybe it's my bias of many years of javascript, but to me punctuation is easier to read than whitespace.
I updated the gist to be the most concise, instead of the most readable, because both are of equal unreadability to me, so I might as well go with concise.
Maybe if I just switch to putting commas at the beginning of lines, the CS wouldn't bother me so much.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
BTW, this doesn't count: