- Alexis Métaireau
- Journal
- Code, etc.
- Notes hebdo
- Lectures
- Projets

# Tag « Javascript »

08 février 2024 Javascript

# Returning objects from an arrow function

When using an arrow function in JavaScript, I was expecting to be able to return objects, but ended up with returning `undefined` values.

Turns out it’s not possible to return directly objects from inside the arrow function because they’re confused as statements.

This is covered by MDN.

To …