JSFiddle - React, Tailwind, and code Playground

by Ansmtz

JavaScript

const l = 1;
const getRandom = (arr) => {
const r = arr[Math.floor(Math.random()*arr.length)];
	 r === 1 ? getRandom(arr) : console.log(r) 
}

getRandom([1,2,3])