Skip to content

Commit

Permalink
Merge pull request mbeaudru#31 from loliconer/master
Browse files Browse the repository at this point in the history
'block scoped' should be 'function scoped'
  • Loading branch information
mbeaudru authored Sep 25, 2017
2 parents 47367af + 4a1e993 commit df1289d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ The [*scope*](#scope_def) of a variable roughly means "where is this variable av

##### var

```var``` declared variables are *function scoped*, meaning that when a variable is created in a function, everything in that function can access that variable. Conversely, a *block scoped* variable created in a function can't be accessed outside this function.
```var``` declared variables are *function scoped*, meaning that when a variable is created in a function, everything in that function can access that variable. Besides, a *function scoped* variable created in a function can't be accessed outside this function.

I recommend you to picture it as if an *X scoped* variable meant that this variable was a property of X.

Expand Down

0 comments on commit df1289d

Please sign in to comment.