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

Loading…
Cancel
Save