Combine keys with corresponding items in values to form and return an object. values could be undefined may not have items corresponding to some keys but all keys must be provided.
keys
values
undefined
Optional
import { zip } from 'apption'const obj = zip(['a', 'b', 'c'], [1, 2, 3]);console.log(obj) // { a: 1, b: 2, c: 3 } Copy
import { zip } from 'apption'const obj = zip(['a', 'b', 'c'], [1, 2, 3]);console.log(obj) // { a: 1, b: 2, c: 3 }
Combine
keys
with corresponding items invalues
to form and return an object.values
could beundefined
may not have items corresponding to some keys but all keys must be provided.