1 2 3 4 5 6 7 8 9 10 11
var a = [1, 2, 3]; a[1] = 5; var push_result = a.push(7); for (var i = 0; i < a.length; ++i) { console.log(a[i]); } console.log("push result: " + push_result);