Skip to content

Comment on A Javascript journey with only six charactersparent

Comments

None is preventing you from writing let f = (a,b,c) => {a * b ^ c}; in JS

when you include curly braces in arrow functions you lose the implicit return, so this function would return undefined

You can get the implicit return if you use parentheses instead:

f = (a,b,c) => (a * b ^ c)

very true :)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.