Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 286 Bytes

beginner_lost_without_a_map.md

File metadata and controls

15 lines (11 loc) · 286 Bytes

Description

Given an array of integers, return a new array with each value doubled.

For example:

[1, 2, 3] --> [2, 4, 6]

My Solution

def maps(x)
  x.map{ |el| el * 2 }
end