Skip to content

Instantly share code, notes, and snippets.

@ahirschberg
Last active August 29, 2015 14:26
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 ahirschberg/4f200bc9831446ee3d09 to your computer and use it in GitHub Desktop.
Save ahirschberg/4f200bc9831446ee3d09 to your computer and use it in GitHub Desktop.
What is the best way to indent when you have functions and arguments together?
// try 1
if (lf_getDeviceStorage()) {
LazyLoader.load(['js/lib/async_storage.js', 'js/lib/mediadb.js'], () => {
createApp()
});
}
// try 2
if (lf_getDeviceStorage()) {
LazyLoader.load(
['js/lib/async_storage.js', 'js/lib/mediadb.js'],
() => {
createApp()
});
}
// try 3
if (lf_getDeviceStorage()) {
var deps = ['js/lib/async_storage.js', 'js/lib/mediadb.js']
LazyLoader.load(deps, () => {
createApp()
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment