Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %w(alice bob carol).each_with_custom_index(3,2) do |person,index|
- puts ">> #{person} is number #{index}"
- end
- >> alice is number 3
- >> bob is number 5
- >> carol is number 7
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement