+ 1
skip -3 and -6 in the for loop?
I have the proper range in loop but I am struggling with properly skipping -3 and -6 from that range of -300 to 0. Please assist https://code.sololearn.com/WmvOs9ROa5H0/#js
3 Respostas
+ 1
Add this before the if statement in the loop:
if(i === -3 || i === -6)
continue;
+ 3
for (var i= -300; i<=0, i!=-3, i!=-6;i++){
do stuff;
}
0
worked thanks guys