# Arrow Functions — JavaScript Fundamentals: From Syntax to Async

Source: https://www.skillbyai.com/en/javascript/js-arrow-functions

> Write concise arrow functions and learn how they handle this differently from regular functions.

## Concise syntax

A single expression can skip both `return` and the braces.

```js
const square = (n) => n * n;
const add = (a, b) => { return a + b; };
console.log(square(5));  // 25
```

## No own this

Arrow functions don't bind their own `this` — they inherit it from the surrounding scope, which fixes a common callback bug.

## When not to use them

Avoid arrow functions as **object methods** when you need `this` to refer to the object — use a regular method instead.
