mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-11-22 12:32:09 +03:00
Fixed bracket placement
This commit is contained in:
parent
d78518288b
commit
7fdce9215a
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user