Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to add two attay into object in javascript

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

var result = {};
keys.forEach((key, i) => result[key] = values[i]);
console.log(result);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #attay #object #javascript
ADD COMMENT
Topic
Name
9+8 =