method
concat
![Moderate documentation Importance_2](https://d2vfyqvduarcvs.cloudfront.net/images/importance_2.png?1349367920)
concat(p1)
public
Register or
log in
to add new notes.
amasses -
May 3, 2010 - (<= v1_8_7_72)
![Default_avatar_30](https://www.gravatar.com/avatar/1704c77d12df42caccc1490333adcb87?size=30&default=http://apidock.com/images/default_avatar_30.png)
2 thanks
Changes self
This method changes the object/array the method is called on. For example:
a = ["a", "b", "c"] b = ["x", "y", "z"] a.concat(b) #=> [a", "b", "c", "z", "y", "z"] a #=> [a", "b", "c", "z", "y", "z"]
In this example the object A is modified, the method modifies the object, then returns the new object.