Y
Hacker News
new
|
ask
|
show
|
jobs
by
qaq
3543 days ago
None is preventing you from writing let f = (a,b,c) => {a * b ^ c}; in JS
1 comments
1000hz
3542 days ago
when you include curly braces in arrow functions you lose the implicit return, so this function would return undefined
link
johnhenry
3542 days ago
You can get the implicit return if you use parentheses instead:
f = (a,b,c) => (a * b ^ c)
link
qaq
3542 days ago
very true :)
link