Newly availableNewly available. Not yet supported in older browsers; verify your target environments before adopting.

Overview

The Iterator.concat() JavaScript method returns an iterator that yields values from a sequence of iterators, exhausting each iterator before moving on to the next.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
146
146
147
26.4
146
26.4
1+Supported (version) Not supported Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)

Syntax

JAVASCRIPT
const combined = Iterator.concat(
  [1, 2, 3],
  new Set([4, 5]),
  [6]
);

[...combined]; // [1, 2, 3, 4, 5, 6]

Live demo

Multiplearray. join

2. Array join, one. and processing..

PreviewFullscreen

different type(Set and Array). join

Set and Array join, duplicates getexclude order to akses..

PreviewFullscreen

Generator and. join

Generator in generatevalue and. Array joindisplay..

PreviewFullscreen

Use cases

  • Using Iterator.concat()

    The Iterator.concat() JavaScript method returns an iterator that yields values from a sequence of iterators, exhausting each iterator before moving on to the next.

Cautions

  • Not supported in older browsers. Verify your target environments before adopting.

Accessibility

  • When updating the DOM dynamically, announce important changes to assistive technology with aria-live regions.

Powered by web-features