Answers for "Function to convert an Array to an Associative array"

0

Function to convert an Array to an Associative array

var obj = {};
for (var i = 0, length = a.length; i < length; i += 2) {
  obj[a[i]] = a[i+1];
}
Posted by: Guest on October-15-2020

Code answers related to "Function to convert an Array to an Associative array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language