src/utils.js
//                           and a 2/3 chance of returning hello
and a 2/3 chance of returning hello
and a 2 / 3 chance of returning hello
function oneOf() {
  let args = [...arguments]
  let arr = []
  args.forEach((item) => {
    if(Array.isArray(item)) {
      arr = arr.concat(Array(item[0]).fill(item[1]))
    } else {
      arr.push(item)
    }
  })
  console.log(arr)
  return arr[Math.floor(Math.random() * arr.length)]
}
function oneOf ( ) { let args = [ ... arguments ] let arr = [ ] args . forEach ( ( item ) => { if ( Array . isArray ( item ) ) { arr = arr . concat ( Array ( item [ 0 ] ) . fill ( item [ 1 ] ) ) } else { arr . push ( item ) } } ) console . log ( arr ) return arr [ Math . floor ( Math . random ( ) * arr . length ) ] }
and a 2/3 chance of returning hello
and a 2 / 3 chance of returning hello