, while (a = next()) {/*do something*/} , , - , while. , , 0, -0, undefined, null, "", NaN , , false.
-, . , - :
var a;
console.log(a = '1234567890abcdefghijklmnopqrstuvwxyz');
1234567890abcdefghijklmnopqrstuvwxyz.
next index++, data. , , next() - , undefined , , .
, . :
var index = 0;
data = ['a','b','c'];
data[index]; // 'a'
index++;
data[index]; // 'b'
index++;
data[index]; // 'c'
index++;
data[index]; // undefined - if passed this will coerce to false and end the loop
Boolean(data[index]); // false