diff options
author | Levi Bostian <levi.bostian@gmail.com> | 2015-08-26 21:14:57 -0500 |
---|---|---|
committer | Levi Bostian <levi.bostian@gmail.com> | 2015-08-26 21:14:57 -0500 |
commit | 96ad94ad867a6226cd90db5c2ff764eb930c6ad6 (patch) | |
tree | 9a9e7b4d4d52c4473b85c079260f49d196564914 | |
parent | 48ccfaed7296ef453f1db154fdce07c090754630 (diff) | |
parent | c00ac0de6612feb54bf0b6d1040c953e2de5df81 (diff) |
Merge pull request #1212 from arthur-vieira/patch-1
Add #push to Array besides shovel operator
-rw-r--r-- | ruby.html.markdown | 2 |
1 files changed, 2 insertions, 0 deletions
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 |