I believe this challenge may have been what prompted your question. Usually,First: if the challenge creators should define random. Ifdefines random is not definedas something other than the default or uniform, it means use your language's builtin for random (see this meta post)new Date%N
may be valid or not on a case by case basis. If the challenge creator says "uniformly" randomFor example, that usuallyif random means that a PRNG"with non-zero probability" or something similar is good enough, new Date
should be OK.
However: in this case,#Is the challenge definescurrent time uniformly random as?
I believe that answer to that question, which is the real question here, is each possibility has a non-zero probability of being chosen
no. It does not need to be uniformIf, it just needs to be possible for both choicesexample, you want to occur. Therforeget many truthy or falsey values, new Date%2
, will give you something like (Math.random()*100)|01,1,1,1,0,0,0,0,0,1,1,1
(which will only return falsey about 1/100th of the time) and other non-uniform multi-choice options, are all valid, under non-zero probability random.
TL;DR read the challenge specs That doesn't look "uniform" to me.