mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-02 20:02:00 -05:00
fix(curriculum): remove grammatical mistakes (#49426)
fixes #49408 fixes the grammar of sentence 'will call the sum function, ....'. so it is clear who is doing the calling.
This commit is contained in:
@@ -11,13 +11,13 @@ dashedName: assignment-with-a-returned-value
|
||||
|
||||
If you'll recall from our discussion about <a href="/learn/javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator" target="_blank" rel="noopener noreferrer nofollow">Storing Values with the Assignment Operator</a>, everything to the right of the equal sign is resolved before the value is assigned. This means we can take the return value of a function and assign it to a variable.
|
||||
|
||||
Assume we have pre-defined a function `sum` which adds two numbers together, then:
|
||||
Assume we have defined a function `sum` which adds two numbers together.
|
||||
|
||||
```js
|
||||
ourSum = sum(5, 12);
|
||||
```
|
||||
|
||||
will call the `sum` function, which returns a value of `17` and assigns it to the `ourSum` variable.
|
||||
Calling the `sum` function with the arguments of `5` and `12` produces a return value of `17`. This return value is assigned to the `ourSum` variable.
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
Reference in New Issue
Block a user