Work on responsive CSS.

This commit is contained in:
Bob Nystrom
2014-04-20 21:42:17 -07:00
parent 767e47bbf6
commit f1c3bb0f37
4 changed files with 45 additions and 61 deletions
+1 -3
View File
@@ -93,7 +93,7 @@ It's an error to call a function with fewer or more arguments than its parameter
## Returning values
Function bodies return values just like methods. If the body is a single expression—more precisely if there is no newline after the `{` or parameter list—then the function implicitly returns the value of the expression.
The body of a function is a [block](syntax.html#blocks). If it is a single expression—more precisely if there is no newline after the `{` or parameter list—then the function implicitly returns the value of the expression.
Otherwise, the body returns `null` by default. You can explicitly return a value using a `return` statement. In other words, these two functions do the same thing:
@@ -104,8 +104,6 @@ Otherwise, the body returns `null` by default. You can explicitly return a value
return "return value"
}
**TODO: Non-local returns?**
## Closures
As you expect, functions are closures: they can access variables defined outside of their scope. They will hold onto closed-over variables even after leaving the scope where the function is defined: