mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-25 14:59:16 +01:00
432 B
432 B
join()
The join method joins the collection's values with a string:
collect(['a', 'b', 'c']).join(', ');
// 'a, b, c'
collect(['a', 'b', 'c']).join(', ', ', and ');
// 'a, b, and c'
collect(['a', 'b']).join(', ', ' and ');
// 'a and b'
collect(['a']).join(', ', ' and ');
// 'a'
collect([]).join(', ', ' and ');
// ''