Assuming there is a javascript array1
with 10,000 elements,
what would be the time complexity of:
var array2=new array();
array2.push(array1);
and what about the time complexity of
var object={};
object['array2']=array1;
Are both operations O(n)? Thank you for clarifying.