DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
js array to object with keys
const arr = ['a','b','c']; const res = arr.reduce((a,b)=> (a[b]='',a),{}); console.log(res)
PREVIOUS
NEXT
Tagged:
#js
#array
#object
#keys
ADD COMMENT
Topic
COMMENT
Name
8+8 =
Submit