create object out of array javascript code example Example: create object out of array javascript Object.assign({}, ['a','b','c']); // {0:"a", 1:"b", 2:"c"}