---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---
# FormData.forEach()

The **`forEach()`** method of the `FormData` interface executes the provided callback function once for each key/value pair in the `FormData` object.

## Syntax

```js
forEach(callbackFn)
forEach(callbackFn, thisArg)
```

### Parameters

- `callbackFn`
  - : A function to execute for each entry in the object. The function will be passed the following arguments:
    - `value`
      - : The value of the current entry.
    - `key`
      - : The key of the current entry.
    - `formData`
      - : The `FormData` object being traversed.
- `thisArg` _**optional**_
  - : A value to use as `this` when executing `callbackFn`.

### Return value

`undefined`
