Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

convert array to object

const names = ['Alex', 'Bob', 'Johny', 'Atta'];

const obj = Object.assign({}, names);
console.log(obj);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #array #object
ADD COMMENT
Topic
Name
6+1 =