This commit is contained in:
Chris Krycho 2024-04-25 22:29:35 -07:00 committed by GitHub
commit e50aa8cc57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -125,7 +125,8 @@ assigning a value to it with the `let` keyword is a statement. In Listing 3-1,
<span class="caption">Listing 3-1: A `main` function declaration containing one statement</span>
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 an
expression.
Statements do not return values. Therefore, you cant assign a `let` statement
to another variable, as the following code tries to do; youll get an error: