argument vs parameter unclear usage of words
See original GitHub issueDescribe your problem and how to reproduce it:
The usage of the word “argument” ist unclear to me. The title of this challenge uses the word “parameter”.
Then the instructions state: “If an arrow function has a single argument, the parentheses enclosing the argument may be omitted.”
But the following snippet cited from the instructions shows the parameter “item” without parentheses:
// the same function, without the argument [sic] parentheses
const doubler = item => item * 2;
The functions are never invoked with an argument in the examples.
As I understand it the sentence should say: “If an arrow function has a single parameter, the parentheses enclosing the parameter may be omitted.”
Add a Link to the page with the problem: https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/es6/write-arrow-functions-with-parameters
or,
Tell us about your browser and operating system:
- Browser Name:
- Browser Version:
- Operating System:
If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box):
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
I would go for:
Just like a regular function, you can pass arguments into an arrow function.
If an arrow function has a single parameter, the parentheses enclosing the parameter may be omitted.
It is possible to pass more than one argument into an arrow function.
These are the ones that should be changed, I think. In fact, we could use
instead.