I have this code
if (!caught.includes("AreYouHuman") && !caught.includes("pfail=1") && caught.includes("Episode") && caught.includes("Anime")) {
var arraystring = caught.split("&s");
var updating = chrome.tabs.update({url: arraystring[0] + "&s=beta&pfail=1"});
}
"caught" is a URL which I get from the browser.
1)would JavaScript stop at the first false statement it counters ( assuming that it iterates over them linearly ( AreYouHuman --> pfail=1 --> Episode -->Anime)).
2)or does it evaluate all of the statements at once then decide whether the whole thing is true or false ?
Assuming that 1) is the correct option, placing the least likely condition to be true,on the first position, would theoretically increase my code execution speed right ?
About the "duplicate" flag non-veteran programmers (like me) won't know "Short-circuit” and probably are not looking for the difference between "&" and "&&", there search would be how does javascript evaluate booleans in an "if statement"