diff --git a/ruby.html.markdown b/ruby.html.markdown index 66a0774d..7bd28d86 100644 --- a/ruby.html.markdown +++ b/ruby.html.markdown @@ -173,6 +173,8 @@ array[1..3] #=> [2, 3, 4] # Add to an array like this array << 6 #=> [1, 2, 3, 4, 5, 6] +# Or like this +array.push(6) #=> [1, 2, 3, 4, 5, 6] # Check if an item exists in an array array.include?(1) #=> true