This is my first question so hello everyone!
I wanted to write condition in way to terminate loop ASAP.
Loop which doesn`t work but should terminate loop faster:
for (
let i = 0;
transactionsSortedByTime[i].unixTime <= unixEndTime && i < listLength;
i++
) {}
Loop which works:
for (
let i = 0;
i < listLength && transactionsSortedByTime[i].unixTime <= unixEndTime;
i++
) {}
Till now I was certain that results of A&&B and B&&A are the same but terminates with false result in different time (when one of them {A or B} is false).
My question is why second one loop iterates properly while first one doesn`t.