Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
why does this CoffeeScript not accurately translate this Ruby?
insert: (ball, column) ->
for row in @rows when row[column] is null
row[column] = ball
return
def insert(ball, column)
@grid.each do |row|
next unless row[column].nil?
row[column] = ball
return
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment