Skip to content

Instantly share code, notes, and snippets.

@oieioi
Created September 4, 2017 09:41
Show Gist options
  • Save oieioi/38cea6852c067e7ce7f94cd1992d9de5 to your computer and use it in GitHub Desktop.
Save oieioi/38cea6852c067e7ce7f94cd1992d9de5 to your computer and use it in GitHub Desktop.
def one_jump str
str
.split('')
.map.with_index{|c, index|
if index % 2 === 0
c
else
nil
end
}.compact.join
end
puts one_jump "aiueo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment