Get a Random Object from Given Array.
npm install @emjimadhu/random-array-obj
const randomObj = require('@emjimadhu/random-array-obj')
// OR
import randomObj from '@emjimadhu/random-array-obj'
let array = ['1', '2', '3', '4']
const objRandom = randomObj(array)
Output should be 2
In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.