From e2a5258f8324644c806cfdd661ac64093a65732d Mon Sep 17 00:00:00 2001 From: Chris Krycho Date: Mon, 4 Mar 2024 12:22:37 -0700 Subject: [PATCH] Clarify function definitions vs. expressions Fixes #2980. --- src/ch03-03-how-functions-work.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ch03-03-how-functions-work.md b/src/ch03-03-how-functions-work.md index b282cbb2ab..bb8c73a62f 100644 --- a/src/ch03-03-how-functions-work.md +++ b/src/ch03-03-how-functions-work.md @@ -125,7 +125,8 @@ assigning a value to it with the `let` keyword is a statement. In Listing 3-1, Function definitions are also statements; the entire preceding example is a -statement in itself. +statement in itself. (As we will see below, *calling* a function is not a +statement.) Statements do not return values. Therefore, you can’t assign a `let` statement to another variable, as the following code tries to do; you’ll get an error: