Answers for "javascript dictionary from two arrays"

0

javascript dictionary from two arrays

var keys = ['foo', 'bar', 'baz'];
var values = [11, 22, 33]

var result = {};
keys.forEach((key, i) => result[key] = values[i]);
console.log(result);
Posted by: Guest on May-13-2020

Code answers related to "javascript dictionary from two arrays"

Code answers related to "Javascript"

Browse Popular Code Answers by Language