Skip to content

Instantly share code, notes, and snippets.

@samueljackson92
Created July 28, 2013 08:25
Show Gist options
  • Save samueljackson92/6097935 to your computer and use it in GitHub Desktop.
Save samueljackson92/6097935 to your computer and use it in GitHub Desktop.
JS formatting quirk
function foo() {
return {
bar : "Hello World!"
}
}
function foo2()
{
return
{
bar : "This won't work!"
}
}
a = foo()
console.log(a.bar)
b = foo2().bar
console.log(b.bar)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment