0

Can someone please explain this in word , what this code says actually!

if(num >= images.length) { num = 0; }

21st Oct 2018, 8:37 AM
Parminder Singh
Parminder Singh - avatar
2 Answers
+ 9
images is an object that has a length property, probably an array that tells you how many elements it contains and if num becomes greater or equal than the length (in a loop probably) num takes the value 0 (and probably loop starts over or ends)
21st Oct 2018, 8:51 AM
Valen.H. ~
Valen.H. ~ - avatar
0
Thanks Valan Sorry but still for me this is not clear its ok if ( num= images.length) but confuse if(num>images.length) because here is ( num=0) why this isnot if(num<=images.length)
21st Oct 2018, 7:37 PM
Parminder Singh
Parminder Singh - avatar