3 ms·
It is a statement block. You need to say f => ({ pizza }) to get an object literal. This isn't that hard to understand.
by 010a 10y ago
It is a statement block. You need to say
f => ({ pizza })
to get an object literal. This isn't that hard to understand.
- ralfn 10y agoBut it's easy to forget, just once. For example: x => () => {} x(); // undefined instead of empty object This can lead to immediate syntax bugs, eventual errors throws and silent semantic errors. Which reinforces the whole argument that they should think a bit harder about all the new features.