Skip to content

Commit 0db121d

Browse files
authored
Updated article.md
Made the statement more clear and precise.
1 parent 31710a3 commit 0db121d

File tree

1 file changed

+1
-1
lines changed
  • 1-js/02-first-steps/15-function-expressions-arrows

1 file changed

+1
-1
lines changed

1-js/02-first-steps/15-function-expressions-arrows/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ ask("Do you agree?", showOk, showCancel);
133133

134134
Before we explore how we can write it in a much shorter way, let's note that in the browser (and on the server-side in some cases) such functions are quite popular. The major difference between a real-life implementation and the example above is that real-life functions use more complex ways to interact with the user than a simple `confirm`. In the browser, such a function usually draws a nice-looking question window. But that's another story.
135135

136-
**The arguments of `ask` are called *callback functions* or just *callbacks*.**
136+
**The arguments `showOk` and `showCancel` of `ask` are called *callback functions* or just *callbacks*.**
137137

138138
The idea is that we pass a function and expect it to be "called back" later if necessary. In our case, `showOk` becomes the callback for the "yes" answer, and `showCancel` for the "no" answer.
139139

0 commit comments

Comments
 (0)