JS中push的用法

JS中push的用法

push 方法改变的是数组本身,返回值是push之后数组的长度。所以,代码应该这样写:var queue = []queue.push( 'A', 'B' )console.log( queue )
JavaScript100