Hacker News new | past | comments | ask | show | jobs | submit login

I can't talk about the comparison to perl/python/ruby, but yes, using the triple dot includes the upper limit, and using the double-dot excludes it. For the typical (for var i=0; i < count-1; i++) scenario, you'd using the double dot (i in 0..count).



Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: