I would like to apply profiling
script to calculate max value of some variables. Any idea why expression
Math.max is not working ?

Support replay:
Without
having tested it (but I checked that Math.max is used in other scripts), my
guess would be that your parameters are string, not numbers (multi-selection is
always string).
Does it work
if you write Math.max(+self.user_safety_risk,
+self....)?
That converts string to number via the unary plus operator - otherwise try
Number() or parseInt(),
Proposed solution are not working.
But it is interesting that in case I use just var result = Math.max(1,2,3,4,5), result is in the cell correct, number 5.
Also in case I try just show value of any variable: var result = self.user_safety_risk is value corerct.
Any further proposal?
Best regards, Klemen