简体   繁体   English

<= 表达式是什么意思?

[英]What does the <= expression mean?

So I have seen something like the code below in a React-Redux application所以我在 React-Redux 应用程序中看到了类似下面的代码

return StartTime <= currentTime && currentTime <= EndTime;

What exactly does this line returns to?这条线到底返回了什么? What does the <= mean? <= 是什么意思?

It's the less than or equal to operator.它是小于或等于运算符。

1 <= 2 // true
1 <= 1 // true
1 <= 0 // false

This is "less than or equal to" operator.这是“小于或等于”运算符。 Example:例子:

return 3 <= 3 && 4 <= 5 //true&&true - true
return 3 <= 2 && 4 <= 5 //false&&true - false

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM