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);
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);
merge 2 dictionaries with same keys javascript
const target = { a: [1], b: [2] };
const source = { a: [2], c: [5] };
const returnedTarget = Object.assign(target, source);
for(var date in source)
target[date] = [...target[date] || [],...source[date]]
console.log(target);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us