小编Ani*_*mar的帖子

需要澄清Ruby逻辑运算符

最近我开始学习Ruby.我正在练习逻辑运算符irb,我得到了这些结果,我不明白.你能帮我澄清一下这些例子吗?

1 and 0
#=> 0 

0 and 1
#=> 1 

0 && 1
#=> 1 
Run Code Online (Sandbox Code Playgroud)

ruby logical-operators

2
推荐指数
1
解决办法
404
查看次数

标签 统计

logical-operators ×1

ruby ×1