Javascript array.shift() is removing all the elements at once

前端 未结 0 1112
天涯浪人
天涯浪人 2021-01-03 01:00

Why is the array returning it as if all of the array.shift()\'s were performed first, then the console.log()\'s?

Here is my code:

var y = [1,2,3,4,5,6]         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题