Y
Hacker News
new
|
ask
|
show
|
jobs
by
xentronium
5123 days ago
0 is true too. I think that's actually brilliant.
[1,2,3].index(1) # => 0 [1,2,3].index(4) # => nil