Python中的and、or ;JS中的&& 、||

Python

>>> 1 and 2
2
>>> 1 or 2
1

For or tests, Python evaluates the operand objects from left to right and returns the first
one that is true

JS

JS和Python在这个点的语法一致

猜你喜欢

转载自www.cnblogs.com/atituiset/p/11298578.html