Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
a=[10,20,30,40,50]
i = 0
a.each_index {|i|
break if a[i] > 20
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment