Boolean operators which return one of the operands

前端 未结 3 544
面向向阳花
面向向阳花 2020-12-21 12:24

In Python, and maybe in Javascript, the boolean or and and operators return one of the operands, instead of true or false

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-21 13:17

    It's called "coalescing". It should behave the same in any browser that claims to be compliant.

提交回复
热议问题