Two conditions can not, only one is possible that is the middle, as you already know. But you can use ||
or other operators, several times. It will still have a condition, but the expression may be much more complex, what matters is that in the end it will result in a boolean. Then you can have multiple comparative expressions bound by relational operators.
But in your case it does not make sense, it is impossible to
index
be less than
tam
, after all it was declared
0
just before and
tam
is a size that can not be less than
0
. It could make it simple like this:
for (let index = 0; index < entrada.length; index++)
It does not make sense, and usually worse, to get the size off the loop. There are other weird and probably wrong things in this code.