if(xxx || xxx), what am I doing wrong?
if-statement, javascript
Solution
As `x!='a' || x!='b'` is always `true`, I guess you wanted `&&` instead of `||`.
Read `||` as `OR` and `&&` as `AND`.
More details in the MDN on logical operators.
Problem
Can someone explain to me what am I doing wrong? ``` function navMenuIntervalCheck() { if (currentSiteUrl != "subsites/players.php" || currentSiteUrl != "subsites/itemshop.php") { $.ajax({ url: currentSiteUrl, cache: false, success: function (dataForContainer) { $('#container').html(dataForContainer); } }); } screenControlCheck(); }; setInterval(function () { navMenuIntervalCheck() }, 5000); ``` When I run my website it refreshes even when `currentSiteUrl==subsites/players.php`