Skip to content

Instantly share code, notes, and snippets.

@JonnieCache
Created November 30, 2011 16:07
Show Gist options
  • Save JonnieCache/1409621 to your computer and use it in GitHub Desktop.
Save JonnieCache/1409621 to your computer and use it in GitHub Desktop.
array = [1, 2]
array.each_with_index do |item, index|
puts "LAST!" if item == array.last
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment