Arrow functions with implicit returns are an awesome, concise way to interact with data.
An example of an arrow function with implicit return
...
For further actions, you may consider blocking this person and/or reporting abuse
Really nice!
And also, using an object into
console.log
prints both the variable name and its value, like:console.log({a, b})
Thank you! This is a really great point!
Ryan just informed me that TypeScript knows console.log is void function so you need to cast it to any.
Thanks again.
That's wicked smart
Great tip Ryan!
That's super clever! I log in functions like this all the time, but I add braces and convert to an explicit return
Thats nice share
Any suggestions on getting this approach to work in TS?
Very helpful but why does console.log evaluate to falsy and why does it still log when false?
really helpful
For Typescript, I think this is easier (a,b) => (console.log(a), a+b)
The comma will only return the last expression-