Skip to content

Instantly share code, notes, and snippets.

@kleytonmr
Last active June 1, 2020 03:04
Show Gist options
  • Save kleytonmr/05767bf54b5c16448d8d2345adcf3406 to your computer and use it in GitHub Desktop.
Save kleytonmr/05767bf54b5c16448d8d2345adcf3406 to your computer and use it in GitHub Desktop.
Pop
# arr.pop( ‹n›* pop ) → obj or nil
a = %w[ f r a b j o u s ]
a.pop # => "s"
a # => ["f", "r", "a", "b", "o", "u"]
a.pop(3) # => ["b", "o", "u"]
a # => ["f", "r", "a", "b"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment