summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSawyer Charles <xssc@users.noreply.github.com>2015-10-19 16:00:22 -0500
committerGabriel SoHappy <czh.gabriel@gmail.com>2015-10-21 02:05:37 +0800
commitf6d070eeac64abce90550f309ab655846115b12e (patch)
tree42081148c00996b045072e83c900a623f20a1664
parentc0171566ba8c9061fb23fc1ab17b11d974cdbb98 (diff)
Fixed bracket placement
-rw-r--r--javascript.html.markdown7
1 files changed, 2 insertions, 5 deletions
diff --git a/javascript.html.markdown b/javascript.html.markdown
index 81dc09a9..a119be88 100644
--- a/javascript.html.markdown
+++ b/javascript.html.markdown
@@ -291,12 +291,9 @@ myFunction("foo"); // = "FOO"
// Note that the value to be returned must start on the same line as the
// `return` keyword, otherwise you'll always return `undefined` due to
// automatic semicolon insertion. Watch out for this when using Allman style.
-function myFunction()
-{
+function myFunction(){
return // <- semicolon automatically inserted here
- {
- thisIsAn: 'object literal'
- }
+ {thisIsAn: 'object literal'}
}
myFunction(); // = undefined