Z
Z
zakharkang2018-01-31 18:07:56
JavaScript
zakharkang, 2018-01-31 18:07:56

Why (8 == (10 || 9 || 8)) === false, and how can I replace this condition?

Hello, I still can't figure out what I'm doing wrong. Thanks in advance for the clarification.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jaroslaw Goszowski, 2018-01-31
@zakharkang

if 8 is not equal to 10 then the rest of the conditions are not checked. here you need something like in_array()
javascript.ru/php/in_array

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question