VOOZH about

URL: https://www.geeksforgeeks.org/javascript/collect-js-implode-method/

⇱ Collect.js implode() Method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Collect.js implode() Method

Last Updated : 27 Nov, 2020

The implode() method is used to join the given items into the collection.

Syntax:

collect(array).implode(join_key)

Parameters: The collect() method takes one argument that is converted into the collection and then implode() method is applied on it. The implode() method holds the value of join key.

Return Value: This method returns the collection items using given join key.

Below example illustrate the implode() method in collect.js:

Example 1:

Output:

10, 20, 30, 40, 50

Example 2:

Output:

Rahul, Aditya, Abhishek, Rahul
Comment
Article Tags: