Skip to content

Commit 2d482ed

Browse files
committed
Clarify function assignment
1 parent 2020876 commit 2d482ed

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • 1-js/02-first-steps/16-function-expressions

‎1-js/02-first-steps/16-function-expressions/article.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ sayHi(); // Hello // this still works too (why wouldn't it)
7272
Here's what happens above in detail:
7373

7474
1. The Function Declaration `(1)` creates the function and puts it into the variable named `sayHi`.
75-
2. Line `(2)` copies it into the variable `func`. Please note again: there are no parentheses after `sayHi`. If there were, then `func = sayHi()` would write *the result of the call* `sayHi()` into `func`, not *the function* `sayHi` itself.
75+
2. Line `(2)` makes the same function available through the variable `func`. Please note again: there are no parentheses after `sayHi`. If there were, then `func = sayHi()` would write *the result of the call* `sayHi()` into `func`, not *the function* `sayHi` itself.
7676
3. Now the function can be called as both `sayHi()` and `func()`.
7777

7878
We could also have used a Function Expression to declare `sayHi`, in the first line:

0 commit comments

Comments
 (0)