@extra-array/join
Version:
Joins values together.
47 lines (33 loc) • 1.16 kB
Markdown
Joins values together.
[:package:](https://www.npmjs.com/package/@extra-array/join)
[:smiley_cat:](https://github.com/orgs/nodef/packages?repo_name=extra-array)
[:running:](https://npm.runkit.com/@extra-array/join)
[:vhs:](https://asciinema.org/a/332086)
[:moon:](https://www.npmjs.com/package/@extra-array/join.min)
[:scroll:](https://unpkg.com/@extra-array/join/)
[:newspaper:](https://nodef.github.io/extra-array/)
[:blue_book:](https://github.com/nodef/extra-array/wiki/)
> Similar: [concat], [join].
> This is part of package [extra-array].
[extra-array]: https://www.npmjs.com/package/extra-array
<br>
```javascript
array.join(x, [sep]);
// x: an array
// sep: separator (,)
```
```javascript
const array = require("extra-array");
var x = [1, 2];
array.join(x);
// "1,2"
array.join(x, " : ");
// "1 : 2"
```
<br>
<br>
## References
- [Array.prototype.join: MDN web docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join)
- [_.join: lodash](https://lodash.com/docs/4.17.15#join)
[concat]: https://github.com/nodef/extra-array/wiki/concat
[join]: https://github.com/nodef/extra-array/wiki/join