3 ms·
0 is true too. I think that's actually brilliant. [1,2,3].index(1) # => 0 [1,2,3].index(4) # => nil
by xentronium 14y ago
0 is true too. I think that's actually brilliant.
[1,2,3].index(1)
# => 0
[1,2,3].index(4)
# => nil
3 ms·