async function urlApi(){
  url = await fetch("https://cfw-takehome.developers.workers.dev/api/variants")
                .then(res => res.json())
                .then(data => {
                  const ind = Math.floor(Math.random()*2)
                  return data['variants'][ind]
                })
  return url
}
/**
 * returns one of the urls from the json api with equal probability
 */
returns one of the urls from the json api with equal probability
returns one of the urls from the json api with equal probability
async function urlApi(){
  url = await fetch("https://cfw-takehome.developers.workers.dev/api/variants")
                .then(res => res.json())
                .then(data => {
                  const ind = Math.floor(Math.random()*2)
                  return data['variants'][ind]
                })
  return url
}
async function urlApi ( ) { url = await fetch ( "https://cfw-takehome.developers.workers.dev/api/variants" ) . then ( res => res . json ( ) ) . then ( data => { const ind = Math . floor ( Math . random ( ) * 2 ) return data [ 'variants' ] [ ind ] } ) return url }
returns one of the urls from the json api with equal probability
returns one of the urls from the json api with equal probability