๐Ÿ”ƒgetRandomFromArray

Get a random item from an array!

Getting a random item from an array!

randomFromArray.js
import { getRandomFromArray } from 'the-simplifier'

let random = async() => {
  let array = [1, 'two', true]

  let result = getRandomFromArray(array)

  console.log(result)
}

random() // Expected: A random item from array

Last updated

Was this helpful?