0
  1. what is the usage of and; or in ruby; what is the reason that 1 and 3 gives 3 but x = 1 y = 2 x < 2 and y > 2 => true
  2. what is the difference between .eql? and == Is there any difference when I code sex=="M" and sex.eql?("M")
Abhinay
  • 1,796
  • 4
  • 28
  • 52
jiaqi
  • 11
  • 2
  • `1 and 3` will give 3. is it a typo or you are really getting `2` instead of `3`? – Abhinay Aug 27 '16 at 05:08
  • Please ask one question at a time. – Ry- Aug 27 '16 at 05:19
  • I think you left out the formatting when you copied your homework question. Presumably part one is talking about the `and` and `or` operators so maybe you should go back and look at a Ruby operator precedence table. – mu is too short Aug 27 '16 at 05:40

0 Answers0