开发者

Ruby logical operators [duplicate]

开发者 https://www.devze.com 2023-01-06 15:14 出处:网络
This question already has answers here: 开发者_C百科Closed 12 years ago. Possible Duplicate: Is there any wisdom behind “and”, “or” operators in Ruby ?
This question already has answers here: 开发者_C百科 Closed 12 years ago.

Possible Duplicate:

Is there any wisdom behind “and”, “or” operators in Ruby ?

What is the difference, if any, between the following pairs of logical operators?

  1. && vs. and
  2. || vs. or


The "word" versions have lower precedence than the "symbol" versions. In fact, they have even lower precedence than assignment.

0

精彩评论

暂无评论...
验证码 换一张
取 消