var arr = [23, 2, 3, 45, 67, 43]; var length = arr.length; var i = 0; for (i; i < length; i++) { var j = 0; setTimeout(function () { console.log(arr[j++]); }, i * 2000) }
var arr = [23, 2, 3, 45, 67, 43]; var length = arr.length; var i = 0; for (i; i < length; i++) { var j = 0; setTimeout(function () { console.log(arr[j++]); }, i * 2000) }