one line printFullName arrow function fix

pull/37/head
Patrick Njuguna 6 years ago committed by GitHub
parent 0dd4d7e165
commit b285ca407b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -319,9 +319,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