https://github.com/namshi/js-array-into-object
Convert an array into an object (odd entries are keys, even entries are values)
https://github.com/namshi/js-array-into-object
Last synced: 5 months ago
JSON representation
Convert an array into an object (odd entries are keys, even entries are values)
- Host: GitHub
- URL: https://github.com/namshi/js-array-into-object
- Owner: namshi
- Created: 2018-06-06T10:12:47.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-06T11:20:23.000Z (about 7 years ago)
- Last Synced: 2025-02-01T00:19:25.143Z (5 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# array-into-object
[](https://travis-ci.com/namshi/js-array-into-object)
Converts an array into an object -- where odd values are keys, and even values are
values.Confused?
``` js
let a2o = require('array-into-object')a2o([1, 2, 3, 4]) // {1: 2, 3: 4}
```