Skip to content

Instantly share code, notes, and snippets.

@padolsey
Created July 17, 2010 13:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save padolsey/479517 to your computer and use it in GitHub Desktop.
Save padolsey/479517 to your computer and use it in GitHub Desktop.
// How it probably should be done:
var options = Array.prototype.slice.call(arguments),
length = options.length,
thisObj = options.shift(),
script = document.createElement('script');
// How I sometimes do it...
var ops = Array.prototype.slice.call(arguments),
len = ops.length,
hoc = ops.shift(),
scr = document.createElement('script');
// Btw, 'hoc' is 'this' in Latin...
@jdalton
Copy link

jdalton commented Jul 17, 2010

Cool. On tabbing the identifiers, I usually do a one space indent for multi-line var lists. (my coding style has been influenced by bits of PrototypeJS, Andrew Dupont, and Diego Perini)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment