Destructure array to object property keys
You can assign destructured values not only to variables but also to existing objects: const arr = [1,2,3], o = {}; ({0:o.one, 1:o.two, 2:o.three} = arr); This works without any additional variables and is less repetitive. However, it also requires two steps, if you are very particular about it.