When would a Ruby flip-flop be useful?

后端 未结 3 1595
没有蜡笔的小新
没有蜡笔的小新 2020-12-06 00:30

I think I understand how a flip-flop works thanks to a tutorial, but the example there is contrived just for teaching. Can anyone give an example of how you have actually us

3条回答
  •  遥遥无期
    2020-12-06 01:03

    Odd/even line highlighting in HTML tables with many rows would seem to be a valid use-case.

    I've written something not as elegant as the above several times in the past when rendering tables in Rails.

提交回复
热议问题