Array.prototype.fill() with object passes reference and not new instance

后端 未结 6 1444
陌清茗
陌清茗 2020-11-22 03:57

I was toying a bit and was trying to instantiate a new array of length x, where all elements of that array were initialized to a value y:

         


        
6条回答
提交回复
热议问题