angularjs - Getting zero length array on angular merge although original array is of 3 length with 3 elements -


i have array.

var arr=new array(3); var o1={name:vv},o2:{name1:{}}; // dummy data. var obj= angular.merge({},o1,o2); 

produces result

obj={    name:[],    name1:{} } 

my question why array length reduced 0 in merge. not able understand scenario.

part b:

var arr1=[1,2,3,3]; console.log(arr1); 

enter image description here question : meaning of : proto :array[0] ?

take @ angular.merge docs. believe talks merging objects objects, not arrays, if read first sentence:

deeply extends destination object dst copying own enumerable properties src object(s) dst.


Comments

Popular posts from this blog

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -