Can you use a compound conditional statement in a JavaScript for loop?
Here is an example,
//using a compound conditional statement
//within a for loop, JavaScript
for (var i=0; i < res.length && i < 5; i++) {};
//or
for (var i=0; i < res.length || i < 5; i++) {};
Yes it could lead to a logic error — like any other code. Hopefully you test your code so you can find those errors and fix them.