method
take
![Some documentation Importance_1](https://d2vfyqvduarcvs.cloudfront.net/images/importance_1.png?1349367920)
take(p1)
public
Returns first n elements from the array.
If a negative number is given, raises an ArgumentError.
See also Array#drop
a = [1, 2, 3, 4, 5, 0] a.take(3) #=> [1, 2, 3]
take(p1)
public
Returns first n elements from the array.
If a negative number is given, raises an ArgumentError.
See also Array#drop
a = [1, 2, 3, 4, 5, 0] a.take(3) #=> [1, 2, 3]