Skip to content

Instantly share code, notes, and snippets.

@harrisonmalone
Last active February 14, 2019 12:33
Show Gist options
  • Save harrisonmalone/e79eace76937c9bdbda3cc771a3837ae to your computer and use it in GitHub Desktop.
Save harrisonmalone/e79eace76937c9bdbda3cc771a3837ae to your computer and use it in GitHub Desktop.
arr = [1, 2, 3, 4]
new_arr = arr.map do |num|
num * 20
end
puts new_arr
=> [20, 40, 60, 80]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment