File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ The following people are totally rad and awesome because they have contributed r
2323* [ Anton Rissanen
] ( http://github.com/antris ) * [email protected] * 2424* Calum Robertson * http://github.com/randusr836 *
2525* Jake Burkhead * https://github.com/jlburkhead *
26+ * [ Alex Johnson] ( https://github.com/nonsensery )
2627* ...You! What are you waiting for? Check out the [ contributing] ( /contributing ) section and get cracking!
2728
2829# Developers
Original file line number Diff line number Diff line change @@ -56,6 +56,16 @@ array1
5656# => [ 1, 2, 3, 4, 5, 6]
5757{% endhighlight %}
5858
59+ A more idiomatic approach is to use the splat operator (` ... ` ) directly in an array literal. This can be used to concatenate any number of arrays.
60+
61+ {% highlight coffeescript %}
62+ array1 = [ 1, 2, 3]
63+ array2 = [ 4, 5, 6]
64+ array3 = [ array1..., array2...]
65+ array3
66+ # => [ 1, 2, 3, 4, 5, 6]
67+ {% endhighlight %}
68+
5969## Discussion
6070
6171CoffeeScript lacks a special syntax for joining arrays, but ` concat() ` and ` push() ` are standard JavaScript methods.
You can’t perform that action at this time.
0 commit comments