I have a calculation sample/formula that outputs the site score mainly based on these parameters,
This works fine in MS Excel.
Here's the calculation sample/formula
Calculation image removed because of client safety and policy.
Now the thing is that I am trying to reproduce this exact formula into JavaScript code, and I am not that familiar with JavaScript Maths, plus some things from the calculation sample are slightly unclear to me.
Here's what I tried:
const siteEvaluationFormula = ((PageViews - 100000) / 750000 * AvgSessionDuration * (totalPercent * 60) + ... nothing after this I just gave up in confusion);
I'm stuck when it comes to calculating the minimum of two numbers. What do I use to calculate the minimum in JavaScript?