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