The same index value of the two arrays are combined into a new value to form a new array

The same index value of the two arrays are combined into a new value to form a new array

premise:

Two arrays of the same length

Generating a new array is the same length after

The return value is an object

 

 

 

The rows of key objects and value-inflicted two arrays,

value is an array of objects

He traversed

He gave each add a new key for the name

And the value corresponding to the index key attached to the name

 

 Each new array on more key name as a member of

 

 

 

Guess you like

Origin www.cnblogs.com/ll15888/p/11994462.html