Skip to content

Commit 5bb77e1

Browse files
authored
Merge pull request #760 from totize/patch-2
Update article.md
2 parents 4a200da + 0eede58 commit 5bb77e1

File tree

1 file changed

+1
-1
lines changed
  • 1-js/06-advanced-functions/06-function-object

1 file changed

+1
-1
lines changed

1-js/06-advanced-functions/06-function-object/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ alert( `Called ${sayHi.counter} times` ); // Called 2 times
153153
```warn header="A property is not a variable"
154154
A property assigned to a function like `sayHi.counter = 0` does *not* define a local variable `counter` inside it. In other words, a property `counter` and a variable `let counter` are two unrelated things.
155155
156-
We can treat a function as an object, store properties in it, but that has no effect on its execution. Variables never use function properties and vice versa. These are just parallel words.
156+
We can treat a function as an object, store properties in it, but that has no effect on its execution. Variables never use function properties and vice versa. These are just parallel worlds.
157157
```
158158

159159
Function properties can replace closures sometimes. For instance, we can rewrite the counter function example from the chapter <info:closure> to use a function property:

0 commit comments

Comments
 (0)