Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/compat/reference/array/forEach.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ forEach(collection, callback);

## Usage

### `forEach(collection, callback)`
### `forEach(collection, callback?)`

Use `forEach` when you want to iterate over all elements of an array or object and execute a callback function for each element. The iteration stops if the callback returns `false`.

Expand Down Expand Up @@ -79,7 +79,7 @@ forEach(undefined, value => {
#### Parameters

- `collection` (`ArrayLike<T> | Record<string, unknown> | null | undefined`): The array or object to iterate over.
- `callback` (`(value: T, index: number | string, collection: any) => void | false`): The function to execute for each element. Returns `false` to stop iteration.
- `callback` (`(value: T, index: number | string, collection: any) => void | false`, optional): The function to execute for each element. Returns `false` to stop iteration. Default is the `identity` function.

#### Returns

Expand Down
2 changes: 1 addition & 1 deletion docs/compat/reference/array/forEachRight.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ forEachRight(collection, callback);

## Usage

### `forEachRight(collection, callback)`
### `forEachRight(collection, callback?)`

Iterates through each element of an array, object, or string from right to left and executes the given callback function. The iteration stops if the callback returns `false`.

Expand Down
4 changes: 2 additions & 2 deletions docs/ja/compat/reference/array/forEach.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ forEach(collection, callback);

## 使用法

### `forEach(collection, callback)`
### `forEach(collection, callback?)`

配列またはオブジェクトのすべての要素を走査し、各要素に対してコールバック関数を実行したい場合は`forEach`を使用してください。コールバックが`false`を返すと走査を中断します。

Expand Down Expand Up @@ -79,7 +79,7 @@ forEach(undefined, value => {
#### パラメータ

- `collection` (`ArrayLike<T> | Record<string, unknown> | null | undefined`): 走査する配列またはオブジェクトです。
- `callback` (`(value: T, index: number | string, collection: any) => void | false`): 各要素に対して実行する関数です。`false`を返すと走査を中断します。
- `callback` (`(value: T, index: number | string, collection: any) => void | false`, 選択): 各要素に対して実行する関数です。`false`を返すと走査を中断します。デフォルトは`identity`関数です。

#### 戻り値

Expand Down
2 changes: 1 addition & 1 deletion docs/ja/compat/reference/array/forEachRight.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ forEachRight(collection, callback);

## 使用法

### `forEachRight(collection, callback)`
### `forEachRight(collection, callback?)`

配列、オブジェクト、文字列を右から左の順序で走査し、各要素に対してコールバック関数を実行します。コールバックが`false`を返すと走査を中断します。

Expand Down
4 changes: 2 additions & 2 deletions docs/ko/compat/reference/array/forEach.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ forEach(collection, callback);

## 사용법

### `forEach(collection, callback)`
### `forEach(collection, callback?)`

배열이나 객체의 모든 요소를 순회하면서 각 요소에 대해 콜백 함수를 실행하고 싶을 때 `forEach`를 사용하세요. 콜백이 `false`를 반환하면 순회를 중단해요.

Expand Down Expand Up @@ -79,7 +79,7 @@ forEach(undefined, value => {
#### 파라미터

- `collection` (`ArrayLike<T> | Record<string, unknown> | null | undefined`): 순회할 배열이나 객체예요.
- `callback` (`(value: T, index: number | string, collection: any) => void | false`): 각 요소에 대해 실행할 함수예요. `false`를 반환하면 순회를 중단해요.
- `callback` (`(value: T, index: number | string, collection: any) => void | false`, 선택): 각 요소에 대해 실행할 함수예요. `false`를 반환하면 순회를 중단해요. 기본값은 `identity` 함수예요.

#### 반환 값

Expand Down
2 changes: 1 addition & 1 deletion docs/ko/compat/reference/array/forEachRight.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ forEachRight(collection, callback);

## 사용법

### `forEachRight(collection, callback)`
### `forEachRight(collection, callback?)`

배열, 객체, 문자열을 오른쪽에서 왼쪽 순서로 순회하면서 각 요소에 대해 콜백 함수를 실행해요. 콜백이 `false`를 반환하면 순회를 중단해요.

Expand Down
4 changes: 2 additions & 2 deletions docs/zh_hans/compat/reference/array/forEach.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ forEach(collection, callback);

## 用法

### `forEach(collection, callback)`
### `forEach(collection, callback?)`

当您想遍历数组或对象的所有元素并对每个元素执行回调函数时,请使用 `forEach`。如果回调返回 `false`,则停止遍历。

Expand Down Expand Up @@ -79,7 +79,7 @@ forEach(undefined, value => {
#### 参数

- `collection` (`ArrayLike<T> | Record<string, unknown> | null | undefined`): 要遍历的数组或对象。
- `callback` (`(value: T, index: number | string, collection: any) => void | false`): 对每个元素执行的函数。返回 `false` 以停止遍历。
- `callback` (`(value: T, index: number | string, collection: any) => void | false`, 可选): 对每个元素执行的函数。返回 `false` 以停止遍历。默认值是 `identity` 函数。

#### 返回值

Expand Down
2 changes: 1 addition & 1 deletion docs/zh_hans/compat/reference/array/forEachRight.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ forEachRight(collection, callback);

## 用法

### `forEachRight(collection, callback)`
### `forEachRight(collection, callback?)`

从右到左顺序遍历数组、对象或字符串,并对每个元素执行回调函数。如果回调返回 `false`,则停止遍历。

Expand Down