LoginSignup
0
0

More than 1 year has passed since last update.

result = true && false && false || trueで少しハマった

Posted at
const result = true && false && false || true // false

2番目の条件でfalseになると思っていた。

ですが結果はtrueです。

考え方は
「true && false && false」 or 「true」
になるので、そりゃtrueになるよなと思った。

いやはや無駄な時間を使ってしまった。。。

0
0
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0