1.

What does the 1..10 indicate?(a) Inclusive range(b) Exclusive range(c) Both inclusive and exclusive range(d) None of the mentionedI have been asked this question in an interview.I'd like to ask this question from For Loop in portion Mathematic Operations and Loops of Ruby

Answer»

Correct OPTION is (a) INCLUSIVE range

Easiest explanation: 1..10 MEANS start from ONE and go till 9 and even include 10.



Discussion

No Comment Found

Related InterviewSolutions