Is the following a pure function?
function test(min,max) { return Math.random() * (max - min) + min; }
My understanding is that a pure func
A pure function is a function where the return value is only determined by its input values, without observable side effects
By using Math.random, you are determining its value by something other than input values. It's not a pure function.
source