ruby邏輯判斷符號

c3tc3tc3t發表於2015-04-22

 

puts true and false  #相當於 (puts true) and false    

Use &&/|| for boolean expressions, and/or for control flow. (Rule of thumb: If you have to use outer parentheses, you are using the wrong operators.) 

相關文章