Ruby logical operators [duplicate]

ぐ巨炮叔叔 提交于 2019-12-02 18:28:05

问题


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

回答1:


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



来源:https://stackoverflow.com/questions/3225613/ruby-logical-operators

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!