Merge pull request #42 from npnjuguna/npnjuguna-one-line-printFullName-arrow-function-fix

one line printFullName arrow function fix
pull/43/head
Asabeneh 5 years ago committed by GitHub
commit 76052d4659
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -388,9 +388,7 @@ console.log(printFullName('Asabeneh', 'Yetayeh'))
The above function has only the return statement, therefore, we can explicitly return it as follows.
```js
const printFullName = (firstName, lastName) => {
return `${firstName} ${lastName}`
}
const printFullName = (firstName, lastName) => `${firstName} ${lastName}`
console.log(printFullName('Asabeneh', 'Yetayeh'))
```

Loading…
Cancel
Save