Skip to content

Instantly share code, notes, and snippets.

@at-longhoang
Created March 14, 2016 08:40
Show Gist options
  • Save at-longhoang/02bc10e7ff39a8f6cd4a to your computer and use it in GitHub Desktop.
Save at-longhoang/02bc10e7ff39a8f6cd4a to your computer and use it in GitHub Desktop.
a = [ "a", "b", "c", "d" ]
p a.map{|x| x + "!" }
p a
a = [ "a", "b", "c", "d" ]
p a.map!{|x| x + "!" }
p a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment