There are 2 forms of range in ruby: inclusive 2 dots - 1..5 => 1, 2, 3, 4, 5 and exclusive 3 dots 1...5 => 1, 2, 3, 4
It's always felt deeply counter-intuitive to me because .. feels like it represents less than ... but that's a separate discussion.
It's always felt deeply counter-intuitive to me because .. feels like it represents less than ... but that's a separate discussion.
No comments yet.