{"ScriptPreparationCode":"var number = Math.random() * 1000;\r\n\r\nfunction arrayPickCentre(val, min, max) {\r\n return [val, max, min].sort((a,b) =\u003E a \u003E b)[1];\r\n}\r\n\r\nfunction mathClampCustom(val, min, max) {\r\n return val \u003C min ? min : (val \u003E max ? max : val);\r\n}\r\n\r\nfunction ifPicker(val, min, max) {\r\n if (val \u003C min) {\r\n return min;\r\n } else if (val \u003E max) {\r\n return max;\r\n } else {\r\n return val;\r\n }\r\n}","TestCases":[{"Name":"Array-sort","Code":"arrayPickCentre(number, 250, 750);","IsDeferred":false},{"Name":"ternary","Code":"mathClampCustom(number, 250, 750);","IsDeferred":false},{"Name":"if-based","Code":"ifPicker(number, 250, 750)","IsDeferred":false}]}