background image

小于

>=

is greater than or equal to

大于等于

5>=8 返回  false

<=

is less than or equal to

小于等于

5<=8 返回  tru

Logical Operators
逻辑判断符(Logical Operators)

Operator

符号

Description

描述

Example

案例

&&

and

x=6

y=3
(x < 10 && y > 1) 

 

返回 true

||

or

x=6

y=3
(x==5 || y==5) 

 

返回 false

!

not

x=6

y=3
!(x==y)返回 true