Implicit VS Explicit return
jimmylandron opened this issue · comments
/*
To do an implicit return, the code must be written in a one-line sentence.
const double = (x) => {
return x * 2; // Explicit return here
}
Since there only is a return value here, we can do an implicit return.
const double = (x) => x * 2;
*/
I think the sentence explaining the implicit return should be written:
Since there is only one line here, we can do an implicit return. Or:
Since there is only one line here, there is no need to add the return keyword.