基础 - Ruby中"?"运算符的使用
黄舟
黄舟 2017-04-25 09:02:28
0
2
963
 if next_move.include? "0" or next_move.include? "1"
     xxxxxxx
 end

在笨办法学Ruby中看到这里不太明白

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
滿天的星座

is not an operator. The ? in ruby ​​can be used in function names to indicate a judgment. For example, include? means whether to include

我想大声告诉你

Convention in ruby?结束的方法名返回值是true/false

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template