Skip to content

Instantly share code, notes, and snippets.

@morten-olsen
Created July 25, 2017 13:54
Show Gist options
  • Select an option

  • Save morten-olsen/b6d8f4e95ee5da4a570173d7ad58461b to your computer and use it in GitHub Desktop.

Select an option

Save morten-olsen/b6d8f4e95ee5da4a570173d7ad58461b to your computer and use it in GitHub Desktop.
JavaScript style guide
function a() {
return {
};
};
console.log(a());
// ouputs: {}
function b()
{
return
{
};
};
console.log(b());
// outputs: undefined
(() => { console.log('1') })()
(() => { console.log('2') })()
// outputs: ERROR!
(() => { console.log('1') })();
(() => { console.log('2') })();
// outputs: 1, 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment