/* * i++; 0 * --j; 4 */var arr = ['a1','a2','a3','a4','a5']; var i = 0,j=arr.length,val; while(val = arr[i++]){ console.log(val) } while(val = arr[--j]){ console.log(val) }