Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
1000hz
on Oct 8, 2016
|
parent
|
context
|
favorite
| on:
A Javascript journey with only six characters
when you include curly braces in arrow functions you lose the implicit return, so this function would return undefined
johnhenry
on Oct 8, 2016
|
next
[–]
You can get the implicit return if you use parentheses instead:
f = (a,b,c) => (a * b ^ c)
qaq
on Oct 8, 2016
|
prev
[–]
very true :)
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: