From 0db121d707a2ff58f318c3856fa01dbf8733ba52 Mon Sep 17 00:00:00 2001 From: Adarsh Naidu <47289788+AdarshNaidu@users.noreply.github.com> Date: Sat, 3 Aug 2019 10:49:28 +0530 Subject: [PATCH] Updated article.md Made the statement more clear and precise. --- 1-js/02-first-steps/15-function-expressions-arrows/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/02-first-steps/15-function-expressions-arrows/article.md b/1-js/02-first-steps/15-function-expressions-arrows/article.md index dfc666b4..cfb7ebbf 100644 --- a/1-js/02-first-steps/15-function-expressions-arrows/article.md +++ b/1-js/02-first-steps/15-function-expressions-arrows/article.md @@ -133,7 +133,7 @@ ask("Do you agree?", showOk, showCancel); 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. -**The arguments of `ask` are called *callback functions* or just *callbacks*.** +**The arguments `showOk` and `showCancel` of `ask` are called *callback functions* or just *callbacks*.** 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.