请教下面return的作用
function removeItem(catno) {
var i, j;
var tmp;
// See if the item already exists in the list, if so then decrement the quantity.
for (i = 0; i < this.items.length; i++)
if (this.items[i].catalogNumber == catno) {
this.items[i].quantity--;
if (this.items[i].quantity > 0)
return; //*****what?****/
// If the quantity drops to zero, remove the item from the list. This is done by
// making a copy the array minus the item to be deleted.
tmp = new Array();
for (j = 0; j < i; j++)
tmp[tmp.length] = this.items[j];
for (j = i + 1; j < this.items.length; j++)
tmp[tmp.length] = this.items[j];
this.items = null;
this.items = tmp;
}
}
return 是跳出此循环还是返回值还是....?