_.join

❗️Lodash onlyJoins a list of elements in an array with a given separator.

  1. // Lodash
  2. var result = _.join(['one', 'two', 'three'], '--')
  3. console.log(result)
  4. // output: 'one--two--three'
  5.  
  6. // Native
  7. var result = ['one', 'two', 'three'].join('--')
  8. console.log(result)
  9. // output: 'one--two--three'

Browser Support for Array.prototype.join()

ChromeEdgeFirefoxIEOperaSafari
1.0 ✔1.0 ✔5.5 ✔